From 6a532dd4e6b853ea3c8e5694f57295e8a3b191f7 Mon Sep 17 00:00:00 2001 From: cassio Date: Tue, 26 Aug 2014 08:33:49 +0100 Subject: few minor fixes and possibility of having a hotstandby bkp --- doc/problemexamples/problemtemplate/run/java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'doc/problemexamples/problemtemplate/run/java') diff --git a/doc/problemexamples/problemtemplate/run/java b/doc/problemexamples/problemtemplate/run/java index cdaef98..e8e8c7a 100755 --- a/doc/problemexamples/problemtemplate/run/java +++ b/doc/problemexamples/problemtemplate/run/java @@ -1,7 +1,7 @@ #!/bin/bash # //////////////////////////////////////////////////////////////////////////////// # //BOCA Online Contest Administrator -# // Copyright (C) 2003-2013 by BOCA System (bocasystem@gmail.com) +# // Copyright (C) 2003-2014 by BOCA System (bocasystem@gmail.com) # // # // This program is free software: you can redistribute it and/or modify # // it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # // You should have received a copy of the GNU General Public License # // along with this program. If not, see . # //////////////////////////////////////////////////////////////////////////////// -#Last modified: 14/sept/2013 by cassio@ime.usp.br +#Last modified: 21/aug/2014 by cassio@ime.usp.br # # parameters are: # $1 main_class @@ -92,7 +92,7 @@ if [ ! -r "$2" ]; then echo "$2 not found (or is not in the current dir) or it's not readable" exit 45 fi -if [ ! -x $sf ]; then +if [ ! -x "$sf" ]; then echo "$sf not found or it's not executable" exit 46 fi @@ -140,12 +140,12 @@ cd "$cdir" [ -d /sys/kernel ] || /bin/mount -t sysfs sysfs /sys java=`which java` [ -x "\$java" ] || java=/usr/bin/java -if [ ! -x \$java ]; then +if [ ! -x "\$java" ]; then echo "\$java not found or it's not executable" exit 47 fi export CLASSPATH=.:./run.jar:$CLASSPATH -$sf -r$nruns -t$time -T$ttime -istdin0 -F256 -u256 -ostdout0 -estderr0 -U$bocau -G$bocag -n0 -C. -f20000 -d20000000 -m20000000 -- \$java -Xmx${maxm}K -Xms${maxm}K "$name" +"$sf" -r$nruns -t$time -T$ttime -istdin0 -F256 -u256 -ostdout0 -estderr0 -U$bocau -G$bocag -n0 -C. -f20000 -d20000000 -m20000000 -- "\$java" -Xmx${maxm}K -Xms${maxm}K "$name" retval=\$? echo \$retval > runit.retcode if [ ! -d /bocajail ]; then @@ -169,11 +169,11 @@ else echo "CODE NOT BEING CHROOTED. DO NOT RUN THIS ON THE MAIN SERVER" >&2 java=`which java` [ -x "$java" ] || java=/usr/bin/java - if [ ! -x $java ]; then + if [ ! -x "$java" ]; then echo "$java not found or it's not executable" exit 47 fi - $sf -r$nruns -t$time -T$ttime -istdin0 -F256 -u256 -U$bocau -G$bocag -ostdout0 -estderr0 -n0 -C. -d20000000 -m20000000 -- $java -cp run.jar -Xmx${maxm}K -Xms${maxm}K "$name" + "$sf" -r$nruns -t$time -T$ttime -istdin0 -F256 -u256 -U$bocau -G$bocag -ostdout0 -estderr0 -n0 -C. -d20000000 -m20000000 -- "$java" -cp run.jar -Xmx${maxm}K -Xms${maxm}K "$name" ret=$? fi if [ $ret -gt 10 ]; then -- cgit v1.2.3