]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- preprocess --target for rpmbuild (args with spaces are likely broken)
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 15 Apr 2008 00:29:13 +0000 (00:29 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    repackage.sh -> 1.28

repackage.sh

index f71b9eb16645ccc06b49776db9136c4a613e682b..3ae6047ca0644edf862aca376319631f5f686bd3 100644 (file)
 set -e
 
 rpmbuild() {
+       # preprocess args, we must have --target as first arg to rpmbuild
+       local a
+       while [ $# -gt 0 ]; do
+               case "$1" in
+               --target)
+                       shift
+                       TARGET=$1
+                       ;;
+               *)
+                       a="$a $1"
+                       ;;
+               esac
+               shift
+       done
+
        # use gz payload as time is what we need here, not compress ratio
 
        # we use %__ldconfig variable to test are we on rpm 4.4.9
@@ -37,7 +52,7 @@ rpmbuild() {
                --define '_binary_payload w9.gzdio' \
                --define '__spec_install_pre %___build_pre' \
                --define '__spec_clean_body %{nil}' \
-               "$@" || exit
+               $a || exit
 }
 
 specdump() {
This page took 0.038686 seconds and 4 git commands to generate.