From 6505f49b63db200d817817d1d01a14005a3d732c Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 12 Apr 2020 12:42:55 +0200 Subject: build scripts: log output --- scripts/build-armhf.sh | 37 ++++++++++++++++++++++--------------- scripts/build-x86_64.sh | 36 ++++++++++++++++++++++-------------- 2 files changed, 44 insertions(+), 29 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 diff --git a/scripts/build-x86_64.sh b/scripts/build-x86_64.sh index 12d56130..b6de4d29 100755 --- a/scripts/build-x86_64.sh +++ b/scripts/build-x86_64.sh @@ -2,21 +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-amd64 -cd $rootdir -rm -rf dist-x86_64 -mkdir -p dist-x86_64/bin -rm -rf build-x86_64 -mkdir build-x86_64 -cd build-x86_64 -# cmake -DCMAKE_INSTALL_PREFIX=$rootdir/dist-x86_64 -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DBUILD_TESTING=ON .. -cmake -DCMAKE_INSTALL_PREFIX=$rootdir/dist-x86_64 -DBUILDEXAMPLES=ON -DDEBUG=ON -DBUILD_TESTING=ON .. -make -make test -make install -cp -a examples/* $rootdir/dist-x86_64/bin +doit() { + echo rootdir $rootdir + echo logfile $logfile -cd $rootdir + cd $rootdir + rm -rf dist-x86_64 + mkdir -p dist-x86_64/bin + rm -rf build-x86_64 + mkdir -p build-x86_64 + cd build-x86_64 + cmake -DCMAKE_INSTALL_PREFIX=$rootdir/dist-x86_64 -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DBUILD_TESTING=ON .. + #cmake -DCMAKE_INSTALL_PREFIX=$rootdir/dist-x86_64 -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DBUILD_TESTING=ON -DDEBUG=ON .. + make + make test + make install + cp -a examples/* $rootdir/dist-x86_64/bin + + cd $rootdir +} + +doit 2>&1 | tee $logfile -- cgit v1.2.3