aboutsummaryrefslogtreecommitdiff
path: root/new-website.sh
blob: 9250de385300d02bc1113195ae94ecbcfb3037bc (plain) (blame)
1
2
3
4
5
6
7
8
9
#!/bin/sh
if [ -z "$1" ]; then
	echo 'Gimme an argument: the name of the new repo (without the suffix), which will be put in /var/www and /var/www/git.andrewyu.org'
	exit 1
fi
mkdir /var/www/"$1"
mkdir /var/www/git.andrewyu.org/"$1"
cp -r /srv/git/template-website.git /srv/git/"$1".git
sed -i 's/WEBSITE-TEMPLATE/'"$1"'/g' /srv/git/"$1".git/hooks/post-receive