packages: compile.sh - take first spec if invoked without args

glen glen at pld-linux.org
Tue Feb 2 14:39:18 CET 2010


Author: glen                         Date: Tue Feb  2 13:39:18 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- take first spec if invoked without args

---- Files affected:
packages:
   compile.sh (1.10 -> 1.11) 

---- Diffs:

================================================================
Index: packages/compile.sh
diff -u packages/compile.sh:1.10 packages/compile.sh:1.11
--- packages/compile.sh:1.10	Tue Apr 28 16:52:04 2009
+++ packages/compile.sh	Tue Feb  2 14:39:13 2010
@@ -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 "$@"
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/compile.sh?r1=1.10&r2=1.11&f=u



More information about the pld-cvs-commit mailing list