]> oss.titaniummirror.com Git - repo_shell.git/commitdiff
Fixes for when /etc/repo_shell.conf is not present
authorR. Steve McKown <rsmckown@gmail.com>
Mon, 1 Oct 2012 16:36:04 +0000 (10:36 -0600)
committerR. Steve McKown <rsmckown@gmail.com>
Mon, 1 Oct 2012 16:36:04 +0000 (10:36 -0600)
scripts/gitcreate
scripts/svncreate

index feef68bb06eed03b3d21c53f4e0d38c35ac0b9e4..c19839f35844137716b9f6f1d0274468f41cf7c8 100755 (executable)
@@ -1,9 +1,10 @@
 #!/bin/sh
 # gitcreate is part of the repo_shell distribution.
 
-eval $(sed -e 's| ||g' < /etc/repo_shell.conf)
+eval $([ -f /etc/repo_shell.conf ] && sed -e 's| ||g' < /etc/repo_shell.conf)
 if [ -z "$owner" -o -z "$git_root" ]; then
     echo "$0: please configure /etc/repo_shell.conf"
+    exit 1
 fi
 gitacls="$git_root/.gitacls"
 
index 280203796dafdc321edc1e188fa49c820bc1c5df..26bcc1536007a1ade00c153beb98c21ddfd6bfcc 100755 (executable)
@@ -2,9 +2,10 @@
 # svncreate is part of the repo_shell distribution.
 
 
-eval $(sed -e 's| ||g' < /etc/repo_shell.conf)
+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.conf"
+    exit 1
 fi
 svndir=$svn_root/..