diff --git a/scripts/pc2sandbox.sh b/scripts/pc2sandbox.sh index 88ba9e79b..2c1577130 100644 --- a/scripts/pc2sandbox.sh +++ b/scripts/pc2sandbox.sh @@ -266,7 +266,8 @@ DEBUG echo Command line: $0 $* shift 6 DEBUG echo -e "\nYou can run this by hand in the sandbox by using the following command:" -RUN_LOCAL_CMD="$0 ${MEMLIMIT} ${TIMELIMIT} xxx xxx $TESTCASE ${COMMAND} $* < ${JUDGEIN} > $TESTCASE.ans" +scriptname=`basename $0` +RUN_LOCAL_CMD="./${scriptname} ${MEMLIMIT} ${TIMELIMIT} xxx xxx $TESTCASE ${COMMAND} $* < ${JUDGEIN} > $TESTCASE.ans" DIFF_OUTPUT_CMD="diff -w ${JUDGEANS} $TESTCASE.ans | more" DEBUG echo -e "\n${RUN_LOCAL_CMD}" DEBUG echo -e "\nor, without the sandbox by using the following command:" diff --git a/scripts/pc2sandbox_interactive.sh b/scripts/pc2sandbox_interactive.sh index e2c6834a0..5b0b49ed1 100644 --- a/scripts/pc2sandbox_interactive.sh +++ b/scripts/pc2sandbox_interactive.sh @@ -395,28 +395,15 @@ COMMAND="$7" DEBUG echo "+---------------- Test Case ${TESTCASE} ----------------+" DEBUG echo Command line: $0 $* shift 7 +# the rest of the commmand line arguments are the command args for the submission -DEBUG echo -e "\nYou can run this by hand in the sandbox by using the following command:" -RUN_LOCAL_CMD="$0 ${MEMLIMIT} ${TIMELIMIT} ${VALIDATOR} ${JUDGEIN} ${JUDGEANS} ${TESTCASE} ${COMMAND} $*" -tcfile=`printf "$REPORTDIR/testcase_%03d.log" $TESTCASE` -REPORT_OUTPUT_CMD="more ${tcfile}" -DEBUG echo -e "\n${RUN_LOCAL_CMD}" -#DEBUG echo -e "\nor, without the sandbox by using the following command:" -#DEBUG echo -e "\n${COMMAND} $* < ${JUDGEIN} > $TESTCASE.ans" -DEBUG echo -e "\nAnd see the run report using the following command:" -DEBUG echo -e "\n${REPORT_OUTPUT_CMD}\n" - -# Skip used arguments -shift 7 -# the rest of the commmand line arguments are the command args for the submission DEBUG echo -e "\nYou can run this by hand in the sandbox by using the following command:" -RUN_LOCAL_CMD="$0 ${MEMLIMIT} ${TIMELIMIT} ${VALIDATOR} ${JUDGEIN} ${JUDGEANS} ${TESTCASE} ${COMMAND} $*" +scriptname=`basename $0` +RUN_LOCAL_CMD="./${scriptname} ${MEMLIMIT} ${TIMELIMIT} ${VALIDATOR} ${JUDGEIN} ${JUDGEANS} ${TESTCASE} ${COMMAND} $*" tcfile=`printf "$REPORTDIR/testcase_%03d.log" $TESTCASE` REPORT_OUTPUT_CMD="more ${tcfile}" DEBUG echo -e "\n${RUN_LOCAL_CMD}" -#DEBUG echo -e "\nor, without the sandbox by using the following command:" -#DEBUG echo -e "\n${COMMAND} $* < ${JUDGEIN} > $TESTCASE.ans" DEBUG echo -e "\nAnd see the run report using the following command:" DEBUG echo -e "\n${REPORT_OUTPUT_CMD}\n"