SHARE
TWEET

Nuovo repository in gitolite

TringaliLuca Nov 6th, 2018 (edited) 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #/bin/bash
  2. # Luca Tringali - www.codice-sorgente.it
  3. sudo su - gitolite
  4. git clone gitolite@localhost:gitolite-admin.git
  5. cd gitolite-admin
  6. _GUSER='luca'
  7. _GREPO='NomeRepo'
  8. echo "Name of gitolite user:"
  9. read _GUSER
  10. echo "Name of new gitolite repo:"
  11. read _GREPO
  12. _match="\@$(echo $_GUSER)repos "
  13. _newline="\n\@$(echo $_GUSER)repos = $_GREPO"
  14. #Start from line 0 and stop at first occurrence of match, execute substituti$
  15. sed -i "0,/$_match/{s/\($_match.*\)/\1$_newline/}" conf/gitolite.conf
  16. git commit -am "New repo $_GREPO"
  17. git push
  18.  
  19. echo "Per inviare file dal tuo pc esegui questi comandi:"
  20. echo "git init"
  21. echo "git remote add origin gitolite@myserver.it:$_GREPO.git"
  22. echo "git commit -am 'First commit'"
  23. echo "git push origin master"
  24.  
  25. echo "Così imposti la descrizione di questo repository:"
  26. echo "ssh gitolite@myserver.it desc $_GREPO description"
  27. echo "Puoi clonare questo repository col comando: git clone gitolite@myserver.it:$_GREPO.git"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top