diff options
author | don bright <hugh.m.bright@gmail.com> | 2012-12-20 17:55:13 (GMT) |
---|---|---|
committer | don bright <hugh.m.bright@gmail.com> | 2012-12-20 17:55:13 (GMT) |
commit | f5cb2ecb3053180d3096e729cc8b0f774d79b1f3 (patch) | |
tree | ae152192285d984bc3964b7931aa9d884ad31ca2 /scripts/uni-build-dependencies.sh | |
parent | 29c3699e0a0660a315be6b0e312075cbdf3c2fc0 (diff) |
enable 'out of tree' call of dependency scripts. fix old ubuntu detection.
Diffstat (limited to 'scripts/uni-build-dependencies.sh')
-rwxr-xr-x | scripts/uni-build-dependencies.sh | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/scripts/uni-build-dependencies.sh b/scripts/uni-build-dependencies.sh index 009d41e..e091444 100755 --- a/scripts/uni-build-dependencies.sh +++ b/scripts/uni-build-dependencies.sh @@ -7,8 +7,6 @@ # # This script builds all library dependencies of OpenSCAD for Linux/BSD # -# This script must be run from the OpenSCAD source root directory -# # Usage: uni-build-dependencies.sh # # Prerequisites: @@ -238,7 +236,7 @@ build_opencsg() cp -av lib/* $DEPLOYDIR/lib cp -av include/* $DEPLOYDIR/include - cd $OPENSCADDIR + cd $BASEDIR } build_eigen() @@ -270,13 +268,18 @@ build_eigen() } -OPENSCADDIR=$PWD -if [ ! -f $OPENSCADDIR/openscad.pro ]; then - echo "Must be run from the OpenSCAD source root directory" - exit 0 +if [ "`command -v dirname`" ]; then + OPENSCAD_SCRIPTDIR=`dirname $0` +else + if [ ! -f openscad.pro ]; then + echo "Must be run from the OpenSCAD source root directory (dont have 'dirname')" + exit 1 + else + OPENSCAD_SCRIPTDIR=$PWD + fi fi -. ./scripts/setenv-unibuild.sh # '.' is equivalent to 'source' +. $OPENSCAD_SCRIPTDIR/setenv-unibuild.sh # '.' is equivalent to 'source' SRCDIR=$BASEDIR/src if [ ! $NUMCPU ]; then @@ -312,7 +315,7 @@ fi # (Most systems have all libraries available as packages except CGAL/OpenCSG) # (They can be built singly here by passing a command line arg to the script) if [ $1 ]; then - if [ $1 = "cgal-use-sys-libs" ]; then + if [ $1 = "cgal" ]; then build_cgal 4.0.2 use-sys-libs exit fi |