Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #/bin/bash
- # Luca Tringali - www.codice-sorgente.it
- sudo su - gitolite
- git clone gitolite@localhost:gitolite-admin.git
- cd gitolite-admin
- _GUSER='luca'
- _GREPO='NomeRepo'
- echo "Name of gitolite user:"
- read _GUSER
- echo "Name of new gitolite repo:"
- read _GREPO
- _match="\@$(echo $_GUSER)repos "
- _newline="\n\@$(echo $_GUSER)repos = $_GREPO"
- #Start from line 0 and stop at first occurrence of match, execute substituti$
- sed -i "0,/$_match/{s/\($_match.*\)/\1$_newline/}" conf/gitolite.conf
- git commit -am "New repo $_GREPO"
- git push
- echo "Per inviare file dal tuo pc esegui questi comandi:"
- echo "git init"
- echo "git remote add origin gitolite@myserver.it:$_GREPO.git"
- echo "git commit -am 'First commit'"
- echo "git push origin master"
- echo "Così imposti la descrizione di questo repository:"
- echo "ssh gitolite@myserver.it desc $_GREPO description"
- echo "Puoi clonare questo repository col comando: git clone gitolite@myserver.it:$_GREPO.git"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement