aboutsummaryrefslogtreecommitdiff
path: root/doc/problemexamples/problemtemplate/compile/c
diff options
context:
space:
mode:
Diffstat (limited to 'doc/problemexamples/problemtemplate/compile/c')
-rw-r--r--doc/problemexamples/problemtemplate/compile/c10
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