fix bug in a python script

do not install crontab anywhere but eressea@gruenbaer
This commit is contained in:
Enno Rehling 2015-09-12 21:19:44 +02:00
parent 28f17b6a08
commit de9fec8eed
2 changed files with 4 additions and 6 deletions

View File

@ -60,11 +60,10 @@ for line in infile.readlines():
output = "%s%s.bz2" % (prefix, extension) output = "%s%s.bz2" % (prefix, extension)
files = files+[output] files = files+[output]
if access(filename, R_OK): if access(filename, R_OK):
if (access(output, R_OK)): if access(output, R_OK):
#print output, "exists, skipping"
continue continue
system("bzip2 %s" % filename) system("bzip2 %s" % filename)
if not access('../wochenbericht.txt'): if not access('../wochenbericht.txt', R_OK):
os.symlink('../parteien', '../wochenbericht.txt') os.symlink('../parteien', '../wochenbericht.txt')
extras = [ '../wochenbericht.txt', '../express.txt' ] extras = [ '../wochenbericht.txt', '../express.txt' ]
for extra in extras: for extra in extras:

View File

@ -27,6 +27,5 @@ install -v $ROOT/process/$prg $DEST/bin/
done done
# install crontab, but only on the eressea server: # install crontab, but only on the eressea server:
HOST=`hostname` WHOAMI=`whoami`@`hostname`
[ "eressea@gruenbaer" = "$WHOAMI" ] && crontab $ROOT/process/cron/crontab
[ "gruenbaer" = "$HOST" ] && crontab $ROOT/process/cron/crontab