From d868f0b9d076dc11ac6b132e1185b265cceb110d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Tue, 2 Feb 2010 13:39:13 +0000 Subject: [PATCH] - take first spec if invoked without args Changed files: compile.sh -> 1.11 --- compile.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/compile.sh b/compile.sh index 36dcbe6..8aa5607 100644 --- a/compile.sh +++ b/compile.sh @@ -13,5 +13,13 @@ # -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 "$@" -- 2.44.0