diff --git a/README.md b/README.md index 60ac907..53371fd 100644 --- a/README.md +++ b/README.md @@ -137,16 +137,25 @@ Make sure that you're capable of using the following development tools: - We'll announce **all** assignments before the semester begins. - Submit your solution to . +- **How to submit your assignment:** + - To submit your solution, you should run `submit.sh` in `scripts` directory. In other words, you should run the following command: + ```bash + # Run this command at the root directory of this repository. + $ ./scripts/submit.sh + + # E.g. To submit `assignment09`, run the following command: + $ ./scripts/submit.sh 9 + ``` + - After running the command above, in the `target` directory, you can find a `assignment.zip` file (`assignment09.zip` for example). Submit this file to . - Read the documentation at . - You can check your grade of each assignment by running the grading script. - You can run the grading script with the following command: ```bash $ ./scripts/grade.sh + + # E.g. To grade `assignment09`, run the following command: + $ ./scripts/grade.sh 9 ``` - - E.g. To grade `assignment09`, run the following command: - ```bash - $ ./scripts/grade.sh 9 - ``` - You're **allowed** to use ChatGPT or other LLMs. Instead, you'll solve more problems than previous semesters. diff --git a/scripts/prepare-submissions.sh b/scripts/prepare-submissions.sh deleted file mode 100755 index 35ee7ac..0000000 --- a/scripts/prepare-submissions.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -set -e - -BASEDIR=$(dirname "$0")/.. - -mkdir -p $BASEDIR/target - -zip -rj $BASEDIR/target/assignment04.zip src/assignments/assignment04 -zip -rj $BASEDIR/target/assignment11.zip src/assignments/assignment11 diff --git a/scripts/submit.sh b/scripts/submit.sh new file mode 100755 index 0000000..4dc272c --- /dev/null +++ b/scripts/submit.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +set -e + +if [ $# != 1 ] + then + echo "===============================" + echo "Invalid argument." + echo "Usage: './submit.sh '" + echo "Example: './submit.sh 1' to grade assignment01" + exit 1 +fi + +BASEDIR=$(dirname "$0")/.. +mkdir -p $BASEDIR/target + +ZIP_FILE=$(printf "$BASEDIR/target/assignment%02d.zip" $1) +SRC_PATH=$(printf "$BASEDIR/src/assignments/assignment%02d" $1) + +echo $ZIP_FILE +echo $SRC_PATH +zip -rj $ZIP_FILE $SRC_PATH