3 if [ -z "$1" -o -z "$2" -o -z "$3" ] ; then
5 echo "Usage: ./release-bm.sh builddir binary-meta-tarball target1 [target2...]"
7 echo "Uses the given binary-meta tarball, and builds it on the"
8 echo "the target systems using the [target] script."
10 echo "target is an optional filename containing binary package"
11 echo "build instructions. See bmchroots, bmlocal, and"
12 echo "bmremote for more information. The filename must have"
13 echo "the word 'root' in it if you wish it to run as root."
15 echo "You can run this multiple times at the same time, for example"
16 echo "to build both remote and chroot scripts at once."
18 echo "Note: You may wish to direct the output to a file, for"
19 echo " later examination."
21 echo "Example: ./release-bm.sh binary-meta.tar.bz2 bmlocal"
32 TARBASE
="$(basename "$1")"
38 while [ -n "$TARGETFILE" ] ; do
39 if echo "$TARGETFILE" |
grep root
> /dev
/null
; then
41 su
- -c "export BMTARBALL=$TARBALL && \
42 export BMTARBASE=$TARBASE && \
43 export BMBUILDDIR=$BUILDDIR && \
44 export THEMODE=release && \
45 export CHOWNUSER=$(whoami) && \
49 export BMTARBALL
=$TARBALL
50 export BMTARBASE
=$TARBASE
51 export BMBUILDDIR
=$BUILDDIR
52 export THEMODE
=release
53 export CHOWNUSER
="$(whoami)"
60 echo "Current build directory:"
63 echo "release-bm.sh done"