diff options
-rwxr-xr-x | scripts/linux-build-dependencies.sh | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/scripts/linux-build-dependencies.sh b/scripts/linux-build-dependencies.sh index aef58b9..6647d07 100755 --- a/scripts/linux-build-dependencies.sh +++ b/scripts/linux-build-dependencies.sh @@ -16,7 +16,9 @@ BASEDIR=$HOME/openscad_deps OPENSCADDIR=$PWD SRCDIR=$BASEDIR/src DEPLOYDIR=$BASEDIR -NUMCPU=2 # paralell builds for some libraries +if [ ! $NUMCPU ]; then + NUMCPU=1 # paralell builds for some libraries +fi printUsage() { @@ -24,6 +26,22 @@ printUsage() echo } +build_git() +{ + version=$1 + echo "Building git" $version "..." + cd $BASEDIR/src + rm -rf git-$version + if [ ! -f git-$version.tar.gz ]; then + curl -O http://git-core.googlecode.com/files/git-$version.tar.gz + fi + tar zxf git-$version.tar.gz + cd git-$version + ./configure --prefix=$DEPLOYDIR + make -j$NUMCPU + make install +} + build_cmake() { version=$1 @@ -208,7 +226,7 @@ fi echo "Using basedir:" $BASEDIR echo "Using deploydir:" $DEPLOYDIR echo "Using srcdir:" $SRCDIR -echo "Number of CPUs for parallel builds:" $NUMCPU +echo "Number of CPUs for parallel builds:" $NUMCPU "(use export NUMCPU=x)" mkdir -p $SRCDIR $DEPLOYDIR export PATH=$BASEDIR/bin:$PATH @@ -226,6 +244,11 @@ fi if [ ! "`command -v cmake`" ]; then build_cmake 2.8.8 fi +if [ "`cmake --version | grep 'version 2.[1-6][^0-9]'`" ]; then + build_cmake 2.8.8 +fi + +# build_git 1.7.10.3 build_eigen 2.0.17 build_gmp 5.0.5 |