github issue #626: installing in non-standard paths

This commit is contained in:
Enno Rehling 2017-01-14 17:19:08 +01:00
parent d73c760949
commit 084b4ed387
3 changed files with 14 additions and 5 deletions

View File

@ -35,12 +35,13 @@ if [ -d $HOME/usr ]; then
PREFIX_PATH=$HOME/usr:$HOME/usr/local:$PREFIX_PATH PREFIX_PATH=$HOME/usr:$HOME/usr/local:$PREFIX_PATH
fi fi
DEST=$(dirname $ROOT)/server
ARGS=" -DCMAKE_MODULE_PATH=$ROOT/cmake/Modules \ ARGS=" -DCMAKE_MODULE_PATH=$ROOT/cmake/Modules \
-DCMAKE_BUILD_TYPE=$BUILD \ -DCMAKE_BUILD_TYPE=$BUILD \
-DCMAKE_LIBRARY_PATH=$LIBRARY_PATH \ -DCMAKE_LIBRARY_PATH=$LIBRARY_PATH \
-DCMAKE_INCLUDE_PATH=$INCLUDE_PATH \ -DCMAKE_INCLUDE_PATH=$INCLUDE_PATH \
-DCMAKE_PREFIX_PATH=$PREFIX_PATH \ -DCMAKE_PREFIX_PATH=$PREFIX_PATH \
-DCMAKE_INSTALL_PREFIX=$HOME/eressea/server" -DCMAKE_INSTALL_PREFIX=$DEST"
git submodule update --init git submodule update --init

View File

@ -8,8 +8,6 @@ while [ ! -d $ROOT/.git ]; do
fi fi
done done
DEST=$(dirname $ROOT)/server
[ -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"

14
s/setup
View File

@ -1,5 +1,15 @@
#!/bin/bash #!/bin/bash
ROOT=$(pwd)
while [ ! -d $ROOT/.git ]; do
ROOT=$(dirname $ROOT)
if [ "/" = "$ROOT" ]; then
echo "could not find root, are you in the git repository?"
exit
fi
done
ERESSEA=$(dirname $ROOT)
function abort() { function abort() {
echo $1 echo $1
[ -z $2 ] && exit -1 [ -z $2 ] && exit -1
@ -37,7 +47,6 @@ while getopts :d:g:r:s:hfn o; do
done done
[ $game -gt 0 ] || abort "must use a positive integer for game id" [ $game -gt 0 ] || abort "must use a positive integer for game id"
[ -d $ERESSEA ] || abort "invalid or missing env variable ERESSEA ($ERESSEA)"
[ -z $SOURCE ] && SOURCE=$ERESSEA/$src [ -z $SOURCE ] && SOURCE=$ERESSEA/$src
[ -d $SOURCE ] || abort "invalid source directory $SOURCE" [ -d $SOURCE ] || abort "invalid source directory $SOURCE"
[ -z $rules ] && rules=e$game [ -z $rules ] && rules=e$game
@ -46,7 +55,8 @@ done
[ -e $TOOLS ] || TOOLS=$SOURCE/bin [ -e $TOOLS ] || TOOLS=$SOURCE/bin
[ -z $INIFILE ] && INIFILE=$TOOLS/inifile [ -z $INIFILE ] && INIFILE=$TOOLS/inifile
[ -e $INIFILE ] || INIFILE=$TOOLS/iniparser/inifile [ -e $INIFILE ] || INIFILE=$TOOLS/iniparser/inifile
#[ -e $INIFILE ] || abort "tool is not installed: $INIFILE"
[ -e $SOURCE/conf/$rules/config.xml ] || abort "cannot find conf/$rules/config.xml"
cd $ERESSEA cd $ERESSEA
if [ -d $dir ] ; then if [ -d $dir ] ; then