SPECS: repackage.sh - add ~/.bcondrc parsing from builder
glen
glen at pld-linux.org
Mon Oct 23 21:58:43 CEST 2006
Author: glen Date: Mon Oct 23 19:58:43 2006 GMT
Module: SPECS Tag: HEAD
---- Log message:
- add ~/.bcondrc parsing from builder
---- Files affected:
SPECS:
repackage.sh (1.4 -> 1.5)
---- Diffs:
================================================================
Index: SPECS/repackage.sh
diff -u SPECS/repackage.sh:1.4 SPECS/repackage.sh:1.5
--- SPECS/repackage.sh:1.4 Sun Feb 5 18:42:02 2006
+++ SPECS/repackage.sh Mon Oct 23 21:58:37 2006
@@ -3,26 +3,25 @@
# i use it a lot!
#
# -glen 2005-03-03
+#
+# TODO
+# - make builder doesn't understand -bi and use builder for short-circuit
set -e
rpmbuild() {
set -x
-
- # i'd use ./builder to get all the ~/.bcondrc parsing,
- # but builder doesn't understand -bi
-# ./builder -ncs -nc -nn --opts --short-circuit "$@"
- /usr/bin/rpmbuild ${TARGET:+--target $TARGET} --short-circuit --define '_source_payload w9.gzdio' "$@" || exit
+ /usr/bin/rpmbuild --short-circuit --define '_source_payload w9.gzdio' $bconds "$@" || exit
}
-SPECFILE="$1"
-tmp=$(awk '/^BuildArch:/ { print $NF}' $SPECFILE)
-if [ "$tmp" ]; then
- TARGET="$tmp"
+bconds=$(./builder --show-bconds "$@")
+# ignore output from older builders whose output is not compatible.
+if [ "$(echo "$bconds" | wc -l)" -gt 1 ]; then
+ bconds=""
fi
# just create the rpm's if -bb is somewhere in the args
if [[ *$@* != *-bb* ]]; then
- rpmbuild -bi "$@"
+ rpmbuild -bi $bconds "$@"
fi
-rpmbuild -bb --define 'clean %{nil}' "$@"
+rpmbuild -bb --define 'clean %{nil}' $bconds "$@"
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/repackage.sh?r1=1.4&r2=1.5&f=u
More information about the pld-cvs-commit
mailing list