Guest User

Untitled

a guest
Jun 19th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. #!/bin/sh
  2. githost=fsck.com
  3. if [ ! -d ~/git/bps ]; then
  4. mkdir -p ~/git/bps
  5. fi
  6.  
  7. cd ~/git/bps
  8. for repo in $(ssh $githost 'ls /git'); {
  9. if [ -d $repo ]; then
  10. echo "Updating repo $repo"
  11. (cd $repo; git pull)
  12. else
  13. echo "Mirroring new repo $repo"
  14. git clone $githost:/git/$repo $repo;
  15. fi
  16. }
  17.  
  18. if [ ! -d ~/git/bps-private ]; then
  19. mkdir -p ~/git/bps-private
  20. fi
  21.  
  22. cd ~/git/bps-private
  23. for repo in $(ssh $githost 'ls /git-private'); {
  24. if [ -d $repo ]; then
  25. echo "Updating repo $repo"
  26. (cd $repo; git pull)
  27. else
  28. echo "Mirroring new repo $repo"
  29. git clone $githost:/git-private/$repo $repo;
  30. fi
  31. }
Add Comment
Please, Sign In to add comment