lib: added Restore::GetNextMeta()
[barry.git] / maintainer / test-build.sh
blobe710df194e4d970d314f5029303f6076c00f4f82
1 #!/bin/sh
3 if [ -z "$1" -o -z "$2" -o -z "$CHROOTUSER" ] ; then
4 echo
5 echo "Usage: ./test-build.sh tarball chroot_target"
6 echo
7 echo "Copies the tarball to the chroot target's tmp dir, then"
8 echo "enters the chroot system as the build user and builds everything."
9 echo
10 echo "Expects CHROOTUSER to be set properly in the environment."
11 echo
12 exit 1
15 TARPATH="$1"
16 TARNAME=`basename "$TARPATH"`
17 TARGET="$2"
19 set -e
21 cp "$TARPATH" "$TARGET/tmp"
22 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"