]>
Commit | Line | Data |
---|---|---|
b0f3c13a ER |
1 | #!/bin/sh |
2 | # will build package, skipping %prep and %build stage | |
3 | # i use it a lot! | |
4 | # | |
5 | # -glen 2005-03-03 | |
6 | ||
7 | set -e | |
8 | ||
9 | rpmbuild() { | |
10 | set -x | |
e5c7e9c1 | 11 | |
b0f3c13a ER |
12 | # i'd use ./builder to get all the ~/.bcondrc parsing, |
13 | # but builder doesn't understand -bi | |
14 | # ./builder -ncs -nc -nn --opts --short-circuit "$@" | |
91e42acf | 15 | /usr/bin/rpmbuild ${TARGET:+--target $TARGET} --short-circuit --define '_source_payload w9.gzdio' "$@" || exit |
b0f3c13a | 16 | } |
e5c7e9c1 | 17 | |
91e42acf ER |
18 | SPECFILE="$1" |
19 | tmp=$(awk '/^BuildArch:/ { print $NF}' $SPECFILE) | |
20 | if [ "$tmp" ]; then | |
21 | TARGET="$tmp" | |
22 | fi | |
23 | ||
e5c7e9c1 ER |
24 | # just create the rpm's if -bb is somewhere in the args |
25 | if [[ *$@* != *-bb* ]]; then | |
26 | rpmbuild -bi "$@" | |
27 | fi | |
28 | rpmbuild -bb --define 'clean %{nil}' "$@" |