]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- take first spec
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 3 Feb 2010 11:20:37 +0000 (11:20 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    repackage.sh -> 1.31

repackage.sh

index 07a3faec0e5cc5db1c4b8ca3a707de2c1aa296aa..460f68a322f0e5fc36512224aa089accc2d74b08 100644 (file)
@@ -87,6 +87,16 @@ specdump() {
        eval rpm-specdump $a || echo >&2 $?
 }
 
+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
+
 tmp=$(specdump "$@" | awk '$2 == "_target_cpu" {print $3}')
 if [ "$tmp" ]; then
        TARGET="$tmp"
This page took 0.046447 seconds and 4 git commands to generate.