]> git.pld-linux.org Git - packages/rpm-build-tools.git/blobdiff - md5
unset GIT_EDITOR together with other GIT_* vars
[packages/rpm-build-tools.git] / md5
diff --git a/md5 b/md5
old mode 100644 (file)
new mode 100755 (executable)
index 9987532..03b9993
--- a/md5
+++ b/md5
@@ -1,2 +1,20 @@
 #!/bin/sh
-./builder -ncs -5 "$@"
+if [ -x ./builder ]; then
+       builder=./builder
+elif [ -x ../builder ]; then
+       builder=../builder
+else
+       builder=builder
+fi
+
+if [ $# = 0 ]; then
+       # if no spec name passed, glob *.spec
+       set -- *.spec
+       if [ ! -f "$1" -o $# -gt 1 ]; then
+               echo >&2 "ERROR: Too many or too few .spec files found"
+               echo >&2 "Usage: ${0##*/} PACKAGE.spec"
+               exit 1
+       fi
+fi
+
+$builder -ncs -5 "$@"
This page took 0.055462 seconds and 4 git commands to generate.