diff options
author | Sven Gothel <[email protected]> | 2022-07-26 02:52:00 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2022-07-26 02:52:00 +0200 |
commit | f3a04a46dacb5ae61d9fb8f8dc65bfb7e96a501b (patch) | |
tree | 68a4732517b4342f6b60e8e373f30fd78247b83f /scripts/rebuild.sh | |
parent | 642845a3af81ebfe48359bcfbdd6d5e910e16036 (diff) |
Update scripts, analog to jaulib v0.14.0-37-g8e76c99
- example symlinks: remove prefix 'run-'
- can invoke from project root dir like in jaulib and cipherlib
- using {build|dist}-OS_NAME-ARCHABI for multi OS support
Diffstat (limited to 'scripts/rebuild.sh')
-rw-r--r-- | scripts/rebuild.sh | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/scripts/rebuild.sh b/scripts/rebuild.sh index 997a5f42..91ed854b 100644 --- a/scripts/rebuild.sh +++ b/scripts/rebuild.sh @@ -4,21 +4,11 @@ sdir=`dirname $(readlink -f $0)` rootdir=`dirname $sdir` bname=`basename $0 .sh` -. $sdir/setup-machine-arch.sh +. $rootdir/jaulib/scripts/setup-machine-arch.sh -logfile=$rootdir/$bname-$archabi.log +logfile=$rootdir/$bname-$os_name-$archabi.log rm -f $logfile -if [ -e /usr/lib/jvm/java-17-openjdk-$archabi ] ; then - export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-$archabi -elif [ -e /usr/lib/jvm/java-11-openjdk-$archabi ] ; then - export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-$archabi -fi -if [ ! -e $JAVA_HOME ] ; then - echo $JAVA_HOME does not exist - exit 1 -fi - CPU_COUNT=`getconf _NPROCESSORS_ONLN` # run 'dpkg-reconfigure locales' enable 'en_US.UTF-8' @@ -26,18 +16,28 @@ export LANG=en_US.UTF-8 export LC_MEASUREMENT=en_US.UTF-8 buildit() { + if [ -z "$JAVA_HOME" -o ! -e "$JAVA_HOME" ] ; then + echo "WARNING: JAVA_HOME $JAVA_HOME does not exist" + else + echo JAVA_HOME $JAVA_HOME + fi echo rootdir $rootdir echo logfile $logfile echo CPU_COUNT $CPU_COUNT - cd $rootdir/build-$archabi + dist_dir="dist-$os_name-$archabi" + build_dir="build-$os_name-$archabi" + echo dist_dir $dist_dir + echo build_dir $build_dir + + cd $rootdir/$build_dir make -j $CPU_COUNT install if [ $? -eq 0 ] ; then - echo "REBUILD SUCCESS $bname $archabi" + echo "REBUILD SUCCESS $bname $os_name $archabi" cd $rootdir return 0 else - echo "REBUILD FAILURE $bname $archabi" + echo "REBUILD FAILURE $bname $os_name $archabi" cd $rootdir return 1 fi |