Last active
August 30, 2023 22:09
-
-
Save grahamannett/aa408820a0613fb66b0d1b038eaf9b18 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
BASE_REPO_PATH="../cs321-resources" | |
RUBRIC_FILE=*-rubric.txt | |
! test -n "$PROJECT_NAME" && echo "PROJECT_NAME must be set" && exit 1 | |
check_for() { | |
if ! test -e $1; then | |
echo "GETTING $1..." | |
cp -r $BASE_REPO_PATH/projects/$PROJECT_NAME/$1 . | |
fi | |
} | |
# alternative is maybe have these be in autograding like: | |
# "setup": "bash runner.sh && javac *.java && chmod +x run-tests.sh", | |
# "run": "./run-tests.sh", | |
run_tests() { | |
echo "RUNNING TESTS..." | |
javac *.java | |
chmod +x run-tests.sh | |
./run-tests.sh | |
} | |
! test -d $BASE_REPO_PATH && git clone https://github.com/BoiseState/CS321-resources $BASE_REPO_PATH | |
check_for test-cases | |
check_for run-tests.sh && chmod +x run-tests.sh | |
check_for $RUBRIC_FILE | |
run_tests |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment