6 if [ -z "$1" -o -z "$2" ] ; then
8 echo "Usage: ./test-build.sh tarball chroot_target"
10 echo "Copies the tarball to the chroot target's tmp dir, then"
11 echo "enters the chroot system as the build user and builds everything."
13 echo "Available chroot targets:"
14 find $CHROOT -type d
-maxdepth 1 -print |
sed "s/^.*\// /"
20 TARNAME
=`basename "$TARPATH"`
25 cp "$TARPATH" "$CHROOT/$TARGET/tmp"
26 chroot
"$CHROOT/$TARGET" su
- "$BUILDUSER" -c /bin
/sh
-lc "rm -rf testbuild && mkdir testbuild && cd testbuild && tar xjvf \"/tmp/$TARNAME\" && cd * && ./configure --prefix=/home/$BUILDUSER/testbuild/rootdir && make install && cd gui && export PKG_CONFIG_PATH=/home/$BUILDUSER/testbuild/rootdir/lib/pkgconfig:\$PKG_CONFIG_PATH && ./configure --prefix=/home/$BUILDUSER/testbuild/rootdir && make install && cd ../opensync-plugin && ./configure --prefix=/home/$BUILDUSER/testbuild/rootdir && make && cd ../../rootdir && find && echo \"Press enter to continue...\" && read && cd ../.. && rm -rf testbuild"