diff options
| author | cassio <cassiopc@gmail.com> | 2015-08-30 22:11:57 +0000 |
|---|---|---|
| committer | cassio <cassiopc@gmail.com> | 2015-08-30 22:11:57 +0000 |
| commit | dd3152be0442e577692067c5523da4f5ab9d9957 (patch) | |
| tree | dd11e8e3bd71404dd7675b8bc8d49f3655a0df61 /tools/boca-submit-run | |
| parent | 9a3077369831bc66fd51bc9c5c276980dd74e046 (diff) | |
| download | boca-dd3152be0442e577692067c5523da4f5ab9d9957.tar.gz boca-dd3152be0442e577692067c5523da4f5ab9d9957.zip | |
multiple bugs to make submission by command line
Diffstat (limited to 'tools/boca-submit-run')
| -rwxr-xr-x | tools/boca-submit-run | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/tools/boca-submit-run b/tools/boca-submit-run index 78e79bd..d67c83f 100755 --- a/tools/boca-submit-run +++ b/tools/boca-submit-run @@ -42,30 +42,33 @@ fi runaux=`which boca-submit-run-aux` if [ "$runaux" == "" ]; then - runaux=/var/www/boca/tools/boca-submit-run-aux + runaux=/usr/bin/boca-submit-run-aux fi -runroot=`which boca-submit-run-root` +runroot=`which boca-submit-run-root-wrapper` if [ "$runroot" == "" ]; then - runroot=/var/www/boca/tools/boca-submit-run-root + runroot=/usr/bin/boca-submit-run-root-wrapper fi if [ -r "$5" ]; then nom=`echo -n "$5" | perl -MURI::Escape -lne 'print uri_escape($_)'` - for BOCASERVER in `echo $BOCASERVERS | cut -d';'`; do - echo "$BOCASERVER: time-out - this will automatically retry soon, you should not worry" + for BOCASERVER in `echo $BOCASERVERS | tr ';' ' '`; do echo "BOCASERVER=$BOCASERVER" > $temp - echo "user=$user" >> $temp - echo "pass=$pass" >> $temp - echo "name=${nom}" >> $temp - echo -n "data=" >> $temp - uuencode -m zzzzzzzzzz < "$5" | grep -v "begin-base64.*zzzzzzzzzz" | perl -MURI::Escape -lne 'print uri_escape($_)' >> $temp - echo "" >> $temp + echo "user=$1" >> $temp + echo "pass=$2" >> $temp + echo "problem=$3" >> $temp + echo "language=$4" >> $temp + echo "name=`basename $5`" >> $temp + uniq=`sha256sum "$5" | cut -f1 -d' '` + echo "uniq=$uniq" >> $temp + echo -en "data=\"" >> $temp + uuencode -m zzzzzzzzzz < "$5" | grep -v "begin-base64.*zzzzzzzzzz" >> $temp + echo -e "\"" >> $temp $runaux $temp if [ "$?" == "2" ]; then echo "$BOCASERVER: time-out - this will automatically retry soon, you should not worry" - $runroot $temp + $runroot "$BOCASERVER" "$1" "$2" "$3" "$4" "`basename $5`" "$5" fi - rm $temp + [ -f "$temp" ] && rm -f $temp done else echo "file $1 not found/readable" |