2014-04-20 18:36:25 +02:00
|
|
|
#!/bin/sh
|
|
|
|
ROOT=$(pwd)
|
|
|
|
while [ ! -d $ROOT/.git ]; do
|
|
|
|
ROOT=$(dirname $ROOT)
|
2015-06-17 08:06:01 +02:00
|
|
|
if [ "/" = "$ROOT" ]; then
|
2014-04-20 18:36:25 +02:00
|
|
|
echo "could not find root, are you in the git repository?"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2015-02-07 19:04:50 +01:00
|
|
|
DEST=$(dirname $ROOT)/server
|
|
|
|
|
2014-04-20 18:36:25 +02:00
|
|
|
MACHINE=`uname -m`
|
|
|
|
[ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc"
|
|
|
|
[ -z "$CC" ] && [ ! -z `which tcc` ] && CC="tcc"
|
|
|
|
[ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc"
|
|
|
|
BIN_DIR="build-$MACHINE-$CC-Debug"
|
|
|
|
|
|
|
|
cd $ROOT/$BIN_DIR
|
|
|
|
make install
|
2014-08-17 11:19:04 +02:00
|
|
|
|
2015-02-07 19:04:50 +01:00
|
|
|
[ -d $DEST/bin ] || mkdir -p $DEST/bin
|
|
|
|
install -v $ROOT/process/cron/*.cron $DEST/bin/
|
2015-09-07 11:04:56 +02:00
|
|
|
programs="create-orders backup-eressea run-turn send-zip-report send-bz2-report"
|
2015-02-08 10:35:59 +01:00
|
|
|
for prg in ${programs} ; do
|
|
|
|
install -v $ROOT/process/$prg $DEST/bin/
|
|
|
|
done
|
2015-06-17 08:06:01 +02:00
|
|
|
|
|
|
|
# install crontab, but only on the eressea server:
|
|
|
|
HOST=`hostname`
|
|
|
|
|
2015-06-17 08:07:47 +02:00
|
|
|
[ "gruenbaer" = "$HOST" ] && crontab $ROOT/process/cron/crontab
|