]> git.pld-linux.org Git - packages/rpm-build-tools.git/blame - repackage.sh
- make some sense in sentence
[packages/rpm-build-tools.git] / repackage.sh
CommitLineData
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
201eefee
ER
6#
7# TODO
1e4db2ae 8# - make builder to understand -bi and use builder for short-circuit
b0f3c13a
ER
9
10set -e
11
12rpmbuild() {
13 set -x
595e4fde 14 /usr/bin/rpmbuild ${TARGET:+--target $TARGET} --short-circuit --define '_source_payload w9.gzdio' "$@" || exit
b0f3c13a 15}
e5c7e9c1 16
201eefee
ER
17bconds=$(./builder --show-bconds "$@")
18# ignore output from older builders whose output is not compatible.
19if [ "$(echo "$bconds" | wc -l)" -gt 1 ]; then
20 bconds=""
91e42acf
ER
21fi
22
595e4fde
ER
23SPECFILE="$1"
24tmp=$(awk '/^BuildArch:/ { print $NF}' $SPECFILE)
25if [ "$tmp" ]; then
26 TARGET="$tmp"
27fi
28
e5c7e9c1
ER
29# just create the rpm's if -bb is somewhere in the args
30if [[ *$@* != *-bb* ]]; then
201eefee 31 rpmbuild -bi $bconds "$@"
e5c7e9c1 32fi
201eefee 33rpmbuild -bb --define 'clean %{nil}' $bconds "$@"
This page took 0.11936 seconds and 4 git commands to generate.