2014-04-20 18:36:25 +02:00
|
|
|
#!/bin/sh
|
2017-08-24 16:57:02 +02:00
|
|
|
|
|
|
|
FORCE=0
|
|
|
|
while getopts f o; do
|
|
|
|
case "${o}" in
|
|
|
|
f) usage ; FORCE=yes ;;
|
|
|
|
esac
|
2014-04-20 18:36:25 +02:00
|
|
|
done
|
|
|
|
|
2017-08-24 16:57:02 +02:00
|
|
|
if [ "$FORCE" != "yes" ] ; then
|
|
|
|
BRANCH=$(git status -s -b | head -1 | cut -d\ -f 2 | sed 's/\..*//')
|
|
|
|
if [ "$BRANCH" != "master" ] ; then
|
2017-09-25 09:32:15 +02:00
|
|
|
echo "You should only install stable versions from the master branch. Use -f to override."
|
2017-08-24 16:57:02 +02:00
|
|
|
exit
|
|
|
|
fi
|
|
|
|
fi
|
2015-10-27 12:32:32 +01:00
|
|
|
[ -z "$CC" ] && [ ! -z `which clang` ] && CC="clang"
|
2014-04-20 18:36:25 +02:00
|
|
|
[ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc"
|
|
|
|
[ -z "$CC" ] && [ ! -z `which tcc` ] && CC="tcc"
|
|
|
|
[ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc"
|
2017-01-11 10:57:42 +01:00
|
|
|
BIN_DIR="Debug"
|
2014-04-20 18:36:25 +02:00
|
|
|
|
2017-08-24 16:57:02 +02:00
|
|
|
ROOT=$(git rev-parse --show-toplevel)
|
2014-04-20 18:36:25 +02:00
|
|
|
cd $ROOT/$BIN_DIR
|
|
|
|
make install
|