stagit-scripts

Stagit management scripts
git clone git://niliara.net/stagit-scripts
Log | Files | Refs

new.sh (553B)


      1 #!/bin/sh
      2 
      3 if [ -z $1 ]; then
      4 	echo "No arguments given."
      5 	exit 1
      6 fi
      7 
      8 git init --bare $1
      9 
     10 cp ~/_templates/post-receive /var/git/$1/hooks/
     11 echo "/var/git/$1/hooks/post-receive" | \
     12 	xargs sed -i "s|name=\"\"|name=\"$1\"|g"
     13 echo "/var/git/update-index.sh" | \
     14 	xargs sed -i "s|> index.html|/var/git/$1/ > index.html|g"
     15 
     16 rm /var/git/$1/description
     17 echo "No description" > /var/git/$1/description
     18 echo "git://niliara.net/$1" > /var/git/$1/url
     19 
     20 mkdir /var/www/git/$1
     21 ln -s /var/www/git/logo.png /var/www/git/$1/
     22 ln -s /var/www/git/style.css /var/www/git/$1/