server/s/install

34 lines
983 B
Plaintext
Raw Normal View History

#!/bin/sh
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
DEST=$(dirname $ROOT)/server
MACHINE=`uname -m`
[ -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"
BIN_DIR="build-$MACHINE-$CC-Debug"
cd $ROOT/$BIN_DIR
make install
[ -d $DEST/bin ] || mkdir -p $DEST/bin
install -v $ROOT/process/cron/*.cron $DEST/bin/
2015-09-12 15:26:00 +02:00
programs="create-orders backup-eressea run-turn send-zip-report send-bz2-report compress.py compress.sh"
2015-02-08 10:35:59 +01:00
for prg in ${programs} ; do
install -v $ROOT/process/$prg $DEST/bin/
done
# install crontab, but only on the eressea server:
2015-09-12 21:43:36 +02:00
# in fact, never do this, because it overwrites hand-edits
#WHOAMI=`whoami`@`hostname`
#[ "eressea@gruenbaer" = "$WHOAMI" ] && crontab $ROOT/process/cron/crontab