From 3f28b0d2e2dea2a1e399a4eac3a6a381ff1a8e81 Mon Sep 17 00:00:00 2001 From: Faerbit Date: Mon, 24 Nov 2014 19:54:13 +0100 Subject: [PATCH] More convenience. --- build.sh | 4 ++-- package.sh | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/build.sh b/build.sh index 9e5c386..9e034a8 100755 --- a/build.sh +++ b/build.sh @@ -23,7 +23,7 @@ threads=$(($(nproc)+1)) cd extern/bullet/ mkdir -p build cd build -if [[ $2 == "ninja" ]] +if hash ninja 2>/dev/null then $cmake -DBUILD_DEMOS=0 -DBUILD_EXTRAS=0 -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=0 -GNinja .. ninja @@ -38,7 +38,7 @@ cd $currentDir mkdir -p build cd build -if [[ $2 == "ninja" ]] +if hash ninja 2>/dev/null then $cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=0 -GNinja .. ninja diff --git a/package.sh b/package.sh index 27a3453..a8d7fc3 100755 --- a/package.sh +++ b/package.sh @@ -12,15 +12,17 @@ then platform="windows" fi -#./build.sh clean - -if hash ninja 2>/dev/null +binaries=$(ls binaries) +if [[ $binaries == *.exe && $platform == linux ]] then - ./build.sh $platform ninja -else - ./build.sh $platform + ./build.sh clean +elif [[ $binaries != *.exe && $platform == windows ]] +then + ./build.sh clean fi +./build.sh $platform + rc=$? if [[ $rc == 0 ]]