fetchfrom.sh 905 B

123456789101112131415161718192021222324252627282930
  1. #! /bin/bash
  2. # This is a private script used by ACN, but is put here so that it can be
  3. # copied to other directories and adapted. It fetches files from a
  4. # remote computer to the current one, omitting backups and version control
  5. # administrative stuff. It may be useful while testing stuff before it is
  6. # checked in to a central repository. The messy ad hoc test on its
  7. # parameter is so that I can invoke it without giving any arguments at all
  8. # on the two machines I use most and in each case it will then fetch
  9. # from the other! When used manually remember to put a "/" after the
  10. # name of the directory that you are fetching from.
  11. src="$1"
  12. if test "$src" = ""
  13. then
  14. if test `uname -n` = "panamint"
  15. then
  16. src="acn1@gauguin.trin.cam.ac.uk:\$O/vsl/"
  17. fi
  18. if test `uname -n` = "gauguin"
  19. then
  20. src="acn1@codemist.dynu.com:\$O/vsl/"
  21. fi
  22. fi
  23. rsync -rC --info=stats2 $src ./
  24. # end of script