summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xxgensum9
1 files changed, 4 insertions, 5 deletions
diff --git a/xgensum b/xgensum
index 38b1136..503df85 100755
--- a/xgensum
+++ b/xgensum
@@ -9,14 +9,13 @@ case "$1" in
 	-i*) i=$1; shift
 esac
 
-if [ -f $1 ]; then
+if [ -f "$1" ]; then
 	. "$1"
-elif [ -f $1/template ]; then
+elif [ -f "$1/template" ]; then
 	exec "$0" $f $i "$1/template"
-elif [ -f template ]; then
-	exec "$0" $f $i template
 else
-	echo 'Usage: xgensum [-f] [-i] TEMPLATE'
+	echo 'Usage: xgensum [-f] [-i] TEMPLATE' 1>&2
+	exit 1
 fi
 
 XBPS_DISTDIR=$(xdistdir)