]> oss.titaniummirror.com Git - repo_shell.git/blobdiff - scripts/svncreate
Fixes for when /etc/repo_shell.conf is not present
[repo_shell.git] / scripts / svncreate
index a1f0ee20e66a4bdacc8339cc235aadd22ce9320a..26bcc1536007a1ade00c153beb98c21ddfd6bfcc 100755 (executable)
@@ -1,9 +1,11 @@
 #!/bin/sh
 # svncreate is part of the repo_shell distribution.
 
-source /etc/repo_shell.cfg
+
+eval $([ -f /etc/repo_shell.conf ] && sed -e 's| ||g' < /etc/repo_shell.conf)
 if [ -z "$owner" -o -z "$svn_root" ]; then
-    echo "$0: please configure /etc/repo_shell.cfg"
+    echo "$0: please configure /etc/repo_shell.conf"
+    exit 1
 fi
 svndir=$svn_root/..
 
@@ -38,7 +40,7 @@ ln -s ../../../svnserve.conf $svn_root/$1/conf/svnserve.conf
 mv $svn_root/$1/hooks $svn_root/$1/hooks.orig
 ln -s ../../hooks $svn_root/$1/hooks
 if [ ! -d $svndir/hooks ]; then
-    echo "$0: WARNING: no hooks directory $svndir/hooks" >&2v
+    mkdir $svndir/hooks
 fi
 
 echo "Repository created.