diff options
Diffstat (limited to 'scripts/build-armhf.sh')
-rwxr-xr-x | scripts/build-armhf.sh | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/scripts/build-armhf.sh b/scripts/build-armhf.sh index 78eaee98..a2d2d05f 100755 --- a/scripts/build-armhf.sh +++ b/scripts/build-armhf.sh @@ -2,22 +2,29 @@ sdir=`dirname $(readlink -f $0)` rootdir=`dirname $sdir` -echo rootdir $rootdir +logfile=`basename $0 .sh`.log +rm -f $logfile export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-armhf -cd $rootdir -rm -rf dist-armhf -mkdir -p dist-armhf/bin -rm -rf build-armhf -mkdir build-armhf -cd build-armhf -cmake -DCMAKE_INSTALL_PREFIX=$rootdir/dist-armhf -DBUILDJAVA=ON -DBUILDEXAMPLES=ON .. -# cmake -DCMAKE_INSTALL_PREFIX=$rootdir/dist-armhf -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DBUILD_TESTING=ON .. -cmake -DCMAKE_INSTALL_PREFIX=$rootdir/dist-armhf -DBUILDEXAMPLES=ON -DDEBUG=ON -DBUILD_TESTING=ON .. -make -make test -make install -cp -a examples/* $rootdir/dist-armhf/bin +doit() { + echo rootdir $rootdir + echo logfile $logfile -cd $rootdir + cd $rootdir + rm -rf dist-armhf + mkdir -p dist-armhf/bin + rm -rf build-armhf + mkdir build-armhf + cd build-armhf + cmake -DCMAKE_INSTALL_PREFIX=$rootdir/dist-armhf -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DBUILD_TESTING=ON .. + #cmake -DCMAKE_INSTALL_PREFIX=$rootdir/dist-armhf -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DBUILD_TESTING=ON -DDEBUG=ON .. + make + make test + make install + cp -a examples/* $rootdir/dist-armhf/bin + + cd $rootdir +} + +doit 2>&1 | tee $logfile |