feat: use hostname if $1 not present
All checks were successful
push / build (push) Successful in 50s

This commit is contained in:
张泊明518370910136 2025-06-25 04:37:40 -04:00
parent 15050ce00f
commit cd81d3bd72
GPG Key ID: CA088E6D9284F870

View File

@ -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"