upload 712 B

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/sh
  2. #
  3. # Upload git configuration from here to the repo
  4. # Please do not introduce bashisms into this script.
  5. #
  6. # Note: This script does not curently work. It used to, on Berlios.
  7. # We leave it here because light modifications will probably work
  8. # on may forges.
  9. # Get around the usual ssh lockout on a repo host by copying up to
  10. # the shell host and doing a local move. Written so the last
  11. # move is atomic.
  12. copy()
  13. {
  14. scp $1 $LOGNAME@shell.xyzzy.foo:STAGE
  15. ssh $LOGNAME@git.xyzzy.foo "cp -f STAGE /gitroot/gpsd && mv /gitroot/gpsd/STAGE /gitroot/gpsd/$1"
  16. }
  17. if [ $1 ]
  18. then
  19. for f in $*; do copy $f ; done
  20. else
  21. copy config
  22. for file in hooks/*
  23. do
  24. copy $file
  25. done
  26. fi
  27. # End