Updated rgit
authorCian Bagshaw <cian@cianb.xyz>
Mon, 27 Feb 2023 22:30:58 +0000 (22:30 +0000)
committerCian Bagshaw <cian@cianb.xyz>
Mon, 27 Feb 2023 22:30:58 +0000 (22:30 +0000)
Allowed for adding of description to remote git repos.

.local/bin/rgit

index 5aa4b6a..936f7e7 100755 (executable)
@@ -7,8 +7,14 @@ HOST=cianb.xyz
 # git dir
 DIR=/var/www/git.cianb.xyz
 
+# description
+read -p "Description: " DESC
+
 # init script
-SCRIPT="cd $DIR; sudo -u git mkdir $1; sudo -u git git init $1 --bare"
+SCRIPT="cd $DIR;\
+       sudo -u git mkdir $1;\
+       sudo -u git git init $1 --bare;\
+       echo $DESC > $1/description;"
 
 # login and run
 ssh $USER@$HOST $SCRIPT