push 363 B

123456789101112131415
  1. #!/bin/bash
  2. set -e
  3. git push backupto
  4. /usr/bin/sync || time '/home/user/bin/sync'
  5. if [[ "$1" =~ back ]]; then
  6. echo 'Done pushing only backup'
  7. exit 0
  8. fi
  9. time git push -u --all origin
  10. #the -u is only needed the first time, or if you've use -u for other remotes like backupto!
  11. /usr/bin/sync || time '/home/user/bin/sync'
  12. gpgconf --kill gpg-agent
  13. echo "All done"