summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-07-25 23:49:19 +0000
committerAndrei Karas <akaras@inbox.ru>2017-07-25 23:49:19 +0000
commitb5c56b1147e6ec93d948c9e5eedcd5d68618b308 (patch)
treef74e6c6e7199cea5bb040ebac71c76e25da09f90
parent38a48f8136c3fa326e126cacbd8131608f25d51c (diff)
parentef92d33af87cddb0269ac50ae78ee2499daf231d (diff)
downloadevol-hercules-b5c56b1147e6ec93d948c9e5eedcd5d68618b308.tar.gz
evol-hercules-b5c56b1147e6ec93d948c9e5eedcd5d68618b308.tar.bz2
evol-hercules-b5c56b1147e6ec93d948c9e5eedcd5d68618b308.tar.xz
evol-hercules-b5c56b1147e6ec93d948c9e5eedcd5d68618b308.zip
Merge branch 'use_env_instead_of_full_path' into 'master'
Use /usr/bin/env for bash See merge request !4
-rwxr-xr-xbuild.sh12
-rwxr-xr-xtools/ci/jobs/clang39.sh2
-rwxr-xr-xtools/ci/jobs/gcc46.sh2
-rwxr-xr-xtools/ci/jobs/gcc48.sh2
-rwxr-xr-xtools/ci/jobs/gcc49.sh2
-rwxr-xr-xtools/ci/jobs/gcc5.sh2
-rwxr-xr-xtools/ci/jobs/gcc6.sh2
-rwxr-xr-xtools/ci/jobs/gccsnapshot.sh2
-rwxr-xr-xtools/vars.sh2
9 files changed, 18 insertions, 10 deletions
diff --git a/build.sh b/build.sh
index dd6c379..6ed9fcd 100755
--- a/build.sh
+++ b/build.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
CMD="$1"
@@ -9,9 +9,17 @@ fi
export LANG=C
source tools/vars.sh
+if [[ "$(uname)" == "FreeBSD" ]]; then
+ export CORES=$(sysctl hw.ncpu | awk '{print $2}')
+else
+ export CORES=$(cat /proc/cpuinfo|grep processor|wc -l)
+fi
+
mkdir build
# this need for some outdated os
mkdir m4
+# for some os, libtoolize should be launch
+libtoolize -i
autoreconf -i
cd build
if [[ "${CMD}" == "default" ]]; then
@@ -23,7 +31,7 @@ elif [[ "${CMD}" == "gprof" ]]; then
export CC=gcc
../configure --enable-gprof CPPFLAGS="${VARS}"
fi
-make -j3
+make -j${CORES}
export RET=$?
cd -
exit $RET
diff --git a/tools/ci/jobs/clang39.sh b/tools/ci/jobs/clang39.sh
index baf2db1..41e4e8a 100755
--- a/tools/ci/jobs/clang39.sh
+++ b/tools/ci/jobs/clang39.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=clang-3.9
export CXX=clang++-3.9
diff --git a/tools/ci/jobs/gcc46.sh b/tools/ci/jobs/gcc46.sh
index f66f604..f2cf542 100755
--- a/tools/ci/jobs/gcc46.sh
+++ b/tools/ci/jobs/gcc46.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-4.6
export CXX=g++-4.6
diff --git a/tools/ci/jobs/gcc48.sh b/tools/ci/jobs/gcc48.sh
index e364a9c..1867d5f 100755
--- a/tools/ci/jobs/gcc48.sh
+++ b/tools/ci/jobs/gcc48.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-4.8
export CXX=g++-4.8
diff --git a/tools/ci/jobs/gcc49.sh b/tools/ci/jobs/gcc49.sh
index 88a7b96..800f970 100755
--- a/tools/ci/jobs/gcc49.sh
+++ b/tools/ci/jobs/gcc49.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-4.9
export CXX=g++-4.9
diff --git a/tools/ci/jobs/gcc5.sh b/tools/ci/jobs/gcc5.sh
index 5dcbe2a..cb959a1 100755
--- a/tools/ci/jobs/gcc5.sh
+++ b/tools/ci/jobs/gcc5.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-5
export CXX=g++-5
diff --git a/tools/ci/jobs/gcc6.sh b/tools/ci/jobs/gcc6.sh
index 34cf845..85f6748 100755
--- a/tools/ci/jobs/gcc6.sh
+++ b/tools/ci/jobs/gcc6.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-6
export CXX=g++-6
diff --git a/tools/ci/jobs/gccsnapshot.sh b/tools/ci/jobs/gccsnapshot.sh
index 542ce31..97fffaf 100755
--- a/tools/ci/jobs/gccsnapshot.sh
+++ b/tools/ci/jobs/gccsnapshot.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc
export CXX=g++
diff --git a/tools/vars.sh b/tools/vars.sh
index 5e52432..24d2aec 100755
--- a/tools/vars.sh
+++ b/tools/vars.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# MAX_SKILL 1510 + 22 = 1532
# MAX_SKILL_ID 10015 + 22 + 9963 = 20022