grading script small fix

This commit is contained in:
AnHaechan
2023-08-27 05:52:51 +00:00
parent 093000df39
commit b70b423aba
2 changed files with 9 additions and 11 deletions

View File

@@ -138,17 +138,14 @@ Make sure that you're capable of using the following development tools:
- We'll announce **all** assignments before the semester begins. - We'll announce **all** assignments before the semester begins.
- Submit your solution to <https://gg.kaist.ac.kr/course/17>. - Submit your solution to <https://gg.kaist.ac.kr/course/17>.
- Read the documentation at <https://cp.kaist.ac.kr/cs220/cs220/>. - Read the documentation at <https://cp.kaist.ac.kr/cs220/cs220/>.
- We provide grading scripts for each assignment. Before submission, you can check your grade with your machine. - You can check your grade of each assignment by running the grading script.
- Grading scripts are located at `scripts/` directory.
- You can run the grading script with the following command: - You can run the grading script with the following command:
```bash ```bash
$ `scripts/grade.sh <assignment number>` $ ./scripts/grade.sh <assignment_number>
``` ```
- For example, - E.g. To grade `assignment09`, run the following command:
- If you want to grade `assignment9`, run the following command:
```bash ```bash
$ cd scripts $ ./scripts/grade.sh 9
$ ./grade.sh 9
``` ```
- You're **allowed** to use ChatGPT or other LLMs. Instead, you'll solve more problems than previous semesters. - You're **allowed** to use ChatGPT or other LLMs. Instead, you'll solve more problems than previous semesters.

View File

@@ -19,9 +19,9 @@ echo "Running with $RUNNER..."
if [ $# != 1 ] if [ $# != 1 ]
then then
echo "===============================" echo "==============================="
echo "Invalid number. $# arguments given." echo "Invalid argument."
echo "Usage: ./grade.sh <test_number>" echo "Usage: './grade.sh <assignment_number>'"
echo "Example: ./grade.sh 1" echo "Example: './grade.sh 1' to grade assignment01"
exit 1 exit 1
fi fi
TEST_NAME=$(printf "TEST%02d" $1) TEST_NAME=$(printf "TEST%02d" $1)
@@ -103,7 +103,8 @@ case $TEST_NAME in
) )
;; ;;
*) *)
echo_err "Invalid test name: $TEST_NAME" echo_err "Invalid assignment number: $1"
echo_err "Assignment number should be within 1 to 12."
exit 1 exit 1
;; ;;
esac esac