diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2016-05-22 16:56:42 +0200 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2016-05-22 16:56:42 +0200 |
commit | 0ff39b70f5d64b6f9cacf5768a4a841de01bed1f (patch) | |
tree | 7f458fe540cf634a352eeff71cd7ffcadb622cf3 | |
parent | 104e8770d897433ea93ad591a5e3afd13a1bb834 (diff) | |
download | xtools-0ff39b70f5d64b6f9cacf5768a4a841de01bed1f.tar.gz xtools-0ff39b70f5d64b6f9cacf5768a4a841de01bed1f.tar.xz xtools-0ff39b70f5d64b6f9cacf5768a4a841de01bed1f.zip |
xgensum: make a bit more robust
-rwxr-xr-x | xgensum | 9 |
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) |