]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- take first spec if invoked without args
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 2 Feb 2010 13:39:13 +0000 (13:39 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    compile.sh -> 1.11

compile.sh

index 36dcbe6f58c392c265b1b4f49dbd28ac324b496f..8aa5607618e1874c2b6f2027ec9b1f841620e5b5 100644 (file)
 # -glen 2005-03-03
 
 dir=$(dirname "$0")
-set -x
+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
 exec $dir/builder --no-md5 -ncs -nn --short-circuit -bc "$@"
This page took 0.04052 seconds and 4 git commands to generate.