diff options
| author | cassio <cassiopc@gmail.com> | 2014-08-26 07:33:49 +0000 |
|---|---|---|
| committer | cassio <cassiopc@gmail.com> | 2014-08-26 07:33:49 +0000 |
| commit | 6a532dd4e6b853ea3c8e5694f57295e8a3b191f7 (patch) | |
| tree | ce63caeeb60be6ac7027665d19a0232bc5a8e31a /doc/problemexamples/problemtemplate/compile/c | |
| parent | a36325e95bfd75af9c37b9e0eac6dcf1028a6f61 (diff) | |
| download | boca-6a532dd4e6b853ea3c8e5694f57295e8a3b191f7.tar.gz boca-6a532dd4e6b853ea3c8e5694f57295e8a3b191f7.zip | |
few minor fixes and possibility of having a hotstandby bkp
Diffstat (limited to 'doc/problemexamples/problemtemplate/compile/c')
| -rw-r--r-- | doc/problemexamples/problemtemplate/compile/c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/problemexamples/problemtemplate/compile/c b/doc/problemexamples/problemtemplate/compile/c index 5376708..77631ec 100644 --- a/doc/problemexamples/problemtemplate/compile/c +++ b/doc/problemexamples/problemtemplate/compile/c @@ -1,7 +1,7 @@ #!/bin/bash # //////////////////////////////////////////////////////////////////////////////// # //BOCA Online Contest Administrator -# // Copyright (C) 2003-2012 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,12 +15,12 @@ # // You should have received a copy of the GNU General Public License # // along with this program. If not, see <http://www.gnu.org/licenses/>. # //////////////////////////////////////////////////////////////////////////////// -#Last modified: 21/july/2012 by cassio@ime.usp.br +#Last modified: 21/august/2014 by cassio@ime.usp.br # # parameters are: # $1 source_file # $2 exe_file (default run.exe) -# $3 timelimit (optional, limit to run all the repetitions, by default only one repetition) +# $3 timelimit # $4 maximum allowed memory (in MBytes, default 512M) # # the output of the submission should be directed to the standard output @@ -105,7 +105,7 @@ else exe=$2 fi -rm -f $exe compileit.retcode runit.retcode 2>/dev/null +rm -f "$exe" compileit.retcode runit.retcode 2>/dev/null cat <<EOF > compileit.sh #!/bin/bash cc=\`which gcc\` @@ -115,7 +115,7 @@ if [ ! -x "\$cc" ]; then exit 47 fi cd src -"\$cc" -static -O2 -o ../$exe $name -lm +"\$cc" -static -O2 -o "../$exe" "$name" -lm echo \$? > ../compileit.retcode exit 0 EOF |