forked from github/server
Merge branch 'master' into develop
This commit is contained in:
commit
c5bd67d62b
21
s/install
21
s/install
|
@ -1,18 +1,25 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
ROOT=$(pwd)
|
|
||||||
while [ ! -d $ROOT/.git ]; do
|
FORCE=0
|
||||||
ROOT=$(dirname $ROOT)
|
while getopts f o; do
|
||||||
if [ "/" = "$ROOT" ]; then
|
case "${o}" in
|
||||||
echo "could not find root, are you in the git repository?"
|
f) usage ; FORCE=yes ;;
|
||||||
exit
|
esac
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ "$FORCE" != "yes" ] ; then
|
||||||
|
BRANCH=$(git status -s -b | head -1 | cut -d\ -f 2 | sed 's/\..*//')
|
||||||
|
if [ "$BRANCH" != "master" ] ; then
|
||||||
|
echo "you should only install stable versions from the master branch"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
fi
|
||||||
[ -z "$CC" ] && [ ! -z `which clang` ] && CC="clang"
|
[ -z "$CC" ] && [ ! -z `which clang` ] && CC="clang"
|
||||||
[ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc"
|
[ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc"
|
||||||
[ -z "$CC" ] && [ ! -z `which tcc` ] && CC="tcc"
|
[ -z "$CC" ] && [ ! -z `which tcc` ] && CC="tcc"
|
||||||
[ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc"
|
[ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc"
|
||||||
BIN_DIR="Debug"
|
BIN_DIR="Debug"
|
||||||
|
|
||||||
|
ROOT=$(git rev-parse --show-toplevel)
|
||||||
cd $ROOT/$BIN_DIR
|
cd $ROOT/$BIN_DIR
|
||||||
make install
|
make install
|
||||||
|
|
Loading…
Reference in New Issue