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 bmbuild binary-meta.tar.bz2 bmlocal"
32 TARBASE
="$(basename "$1")"
37 if echo "$TARGETFILE" |
grep root
> /dev
/null
; then
39 su
- -c "export BMTARBALL=$TARBALL && \
40 export BMTARBASE=$TARBASE && \
41 export BMBUILDDIR=$BUILDDIR && \
42 export THEMODE=release && \
43 export CHOWNUSER=$(whoami) && \
47 export BMTARBALL
=$TARBALL
48 export BMTARBASE
=$TARBASE
49 export BMBUILDDIR
=$BUILDDIR
50 export THEMODE
=release
51 export CHOWNUSER
="$(whoami)"
61 echo "Current build directory:"
64 echo "release-bm.sh done"