tzwrapper.cc: fixed use of iterator after erase
[barry.git] / maintainer / test-build.sh
blob9f14d9f618d160a4b8032e6fe292165996543733
1 #!/bin/bash
3 FIXME - CHROOTUSER is no longer an environment variable
5 if [ -z "$1" -o -z "$2" -o -z "$CHROOTUSER" ] ; then
6 echo
7 echo "Usage: ./test-build.sh tarball chroot_target"
8 echo
9 echo "Copies the tarball to the chroot target's tmp dir, then"
10 echo "enters the chroot system as the build user and builds everything."
11 echo
12 echo "Expects CHROOTUSER to be set properly in the environment."
13 echo
14 exit 1
17 TARPATH="$1"
18 TARNAME=`basename "$TARPATH"`
19 TARGET="$2"
21 set -e
23 cp "$TARPATH" "$TARGET/tmp"
24 chroot "$TARGET" su - "$CHROOTUSER" -c /bin/sh -lc "rm -rf testbuild && mkdir testbuild && cd testbuild && tar xjvf \"/tmp/$TARNAME\" && cd * && ./configure --prefix=/home/$CHROOTUSER/testbuild/rootdir && make install && cd gui && export PKG_CONFIG_PATH=/home/$CHROOTUSER/testbuild/rootdir/lib/pkgconfig:\$PKG_CONFIG_PATH && ./configure --prefix=/home/$CHROOTUSER/testbuild/rootdir && make install && cd ../opensync-plugin && ./configure --prefix=/home/$CHROOTUSER/testbuild/rootdir && make && cd ../../rootdir && find && echo \"Press enter to continue...\" && read && cd ../.. && rm -rf testbuild"