3 if [ -z "$1" -o -z "$2" -o -z "$CHROOTUSER" ] ; then
5 echo "Usage: ./test-build.sh tarball chroot_target"
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."
10 echo "Expects CHROOTUSER to be set properly in the environment."
16 TARNAME
=`basename "$TARPATH"`
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"