diff --git a/bin/joj3-forge-convert b/bin/joj3-forge-convert index 38afe6e..ea253a4 100755 --- a/bin/joj3-forge-convert +++ b/bin/joj3-forge-convert @@ -2,11 +2,10 @@ set -ex if [ -z "$1" ]; then - echo "error: course name is required" >&2 - exit 1 + COURSE=$(hostname | cut -d'/' -f2 | cut -d'-' -f1) +else + COURSE="$1" fi - -COURSE="$1" CONFIG_REPO_PATH="/home/tt/.cache/$COURSE-config" GRADING_REPO_PATH="/home/tt/.cache/$COURSE-joj" GIT_USER="bot-$COURSE"