diff options
author | Sven Gothel <[email protected]> | 2020-10-16 16:08:23 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-10-16 16:08:23 +0200 |
commit | d5c6787a8d7e9c123b6c30dd877af58057df4204 (patch) | |
tree | d719b90b1a374de02f354faa2fdeac19e762b7ce /scripts/rebuild.sh | |
parent | da13a199446d143732cc6d0d996501bac1c1d4f8 (diff) |
Move jaucpp files to root-folder
Diffstat (limited to 'scripts/rebuild.sh')
-rw-r--r-- | scripts/rebuild.sh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/scripts/rebuild.sh b/scripts/rebuild.sh new file mode 100644 index 0000000..b41214a --- /dev/null +++ b/scripts/rebuild.sh @@ -0,0 +1,38 @@ +#! /bin/sh + +sdir=`dirname $(readlink -f $0)` +rootdir=`dirname $sdir` +bname=`basename $0 .sh` +logfile=$bname.log +rm -f $logfile + +. $sdir/setup-machine-arch.sh + +export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-$archabi +if [ ! -e $JAVA_HOME ] ; then + echo $JAVA_HOME does not exist + exit 1 +fi + +CPU_COUNT=`getconf _NPROCESSORS_ONLN` + +buildit() { + echo rootdir $rootdir + echo logfile $logfile + echo CPU_COUNT $CPU_COUNT + + cd $rootdir/build-$archabi + make -j $CPU_COUNT install test + if [ $? -eq 0 ] ; then + echo "REBUILD SUCCESS $bname $archabi" + cd $rootdir + return 0 + else + echo "REBUILD FAILURE $bname $archabi" + cd $rootdir + return 1 + fi +} + +buildit 2>&1 | tee $logfile + |