setginserver 701 B

123456789101112131415161718192021222324252627
  1. # set server, use HU server
  2. if ! gin use-server hu; then
  3. echo "set gin server"
  4. # set gin remote from git information (on the hu server)
  5. gin add-server --web https://gindata.biologie.hu-berlin.de:443 --git git@gindata.biologie.hu-berlin.de:10022 hu
  6. fi
  7. # chose hu server for this computer
  8. gin use-server hu
  9. # set remote
  10. if ! gin remotes; then
  11. echo "set gin remote"
  12. # set gin remote from git information (on the hu server)
  13. remotegit=$(git remote get-url origin)
  14. remotegin="$(echo "$remotegit" | cut -d'/' -f4,5)"
  15. remotegin="$(echo $remotegin | cut -d' ' -f1)"
  16. remotegin="$(echo "hu:""${remotegin/.git}")"
  17. gin add-remote primary "$remotegin"
  18. else
  19. echo gin remote set
  20. fi