summaryrefslogtreecommitdiff
path: root/mkrepo.sh
blob: 3d801d8b49063c9c599518982773c01516b734d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

if [ -z $1 ]; then
	echo "Usage: $0 <reponame>."
	exit
fi

repodir="$1.git"

if [ -d $repodir ]; then
	echo "Directory $repodir already exists."
	exit
fi

mkdir $repodir
GIT_DIR=$repodir git init
touch $repodir/git-daemon-export-ok
read -e -p "Description: " description
echo -E $description > $repodir/description
chmod +x $repodir/hooks/post-update