shift
fi
-if [ $# -ne 1 ]; then
- echo "usage: $0 <repopath>" >&2
+if [ $# -lt 1 -o $# -gt 2 ]; then
+ echo "usage: $0 <repopath> [\"Short description\"]" >&2
exit 1
fi
repopath=$1
+repodesc=$2
if [ -e $git_root/$repopath ]; then
echo "$0: repository $repopath already exists" >&2
git --git-dir "$git_root/$repopath" init --bare
[ $? -ne 0 ] && exit 1
+# Update the description
+if [ -n "$2" ]; then
+ echo $2 > $git_root/$repopath/description
+fi
+
# Create symbolic links to any hook scripts in $githookspath
hooks="pre-receive post-receive update post-update"
backdir=$(echo "$repopath/hooks" | sed -e 's|[^/]*|..|g')