server/s/install

26 lines
635 B
Plaintext
Raw Permalink Normal View History

#!/bin/sh
FORCE=0
while getopts f o; do
case "${o}" in
f) usage ; FORCE=yes ;;
esac
done
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."
exit
fi
fi
[ -z "$CC" ] && [ ! -z `which clang` ] && CC="clang"
[ -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"
ROOT=$(git rev-parse --show-toplevel)
cd $ROOT/$BIN_DIR
make install