fix preview scripts to auto-checkout master

This commit is contained in:
Enno Rehling 2014-09-21 10:03:48 +02:00
parent f6e976296e
commit c5be92a7fc
2 changed files with 12 additions and 8 deletions

View File

@ -1,9 +1,9 @@
#!/bin/sh #!/bin/sh
[ -z $ERESSEA ] && ERESSEA=$HOME/eressea
cd $ERESSEA/git SRC=$ERESSEA/git
s/preview build $SRC/s/preview build master
s/preview version $SRC/s/preview version
for game in 2 3 4 ; do for game in 2 3 4 ; do
s/preview -g $game run && \ $SRC/s/preview -g $game run && \
s/preview -g $game send $SRC/s/preview -g $game send
done done

View File

@ -23,6 +23,7 @@ function build() {
assert_dir $SOURCE assert_dir $SOURCE
cd $SOURCE cd $SOURCE
git pull || abort "failed to update source. do you have local changes?" git pull || abort "failed to update source. do you have local changes?"
[ -z $1 ] || git checkout $1
s/build || abort "build failed." s/build || abort "build failed."
} }
@ -87,7 +88,9 @@ zip="$turn-$1.zip"
zip -q -u $zip $turn-$1.?r zip -q -u $zip $turn-$1.?r
email=$(grep "faction=$1:" reports.txt | cut -d: -f2 | sed 's/email=//') email=$(grep "faction=$1:" reports.txt | cut -d: -f2 | sed 's/email=//')
echo "sending reports to $1 / $email" echo "sending reports to $1 / $email"
cat /dev/null | mutt -F $ERESSEA/etc/muttrc -s "Testauswertung Spiel $game Partei $1" -a $zip -- $email info=/dev/null
[ -e ../email.txt ] && info=../email.txt
cat $info | mutt -F $ERESSEA/etc/muttrc -s "Testauswertung Spiel $game Partei $1" -a $zip -- $email
} }
game=0 game=0
@ -128,7 +131,8 @@ case "$1" in
version version
;; ;;
"build") "build")
build shift
build $*
;; ;;
"setup") "setup")
setup setup