feat: use hostname if $1 not present
All checks were successful
push / build (push) Successful in 50s
All checks were successful
push / build (push) Successful in 50s
This commit is contained in:
parent
15050ce00f
commit
cd81d3bd72
|
@ -2,11 +2,10 @@
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
echo "error: course name is required" >&2
|
COURSE=$(hostname | cut -d'/' -f2 | cut -d'-' -f1)
|
||||||
exit 1
|
else
|
||||||
fi
|
|
||||||
|
|
||||||
COURSE="$1"
|
COURSE="$1"
|
||||||
|
fi
|
||||||
CONFIG_REPO_PATH="/home/tt/.cache/$COURSE-config"
|
CONFIG_REPO_PATH="/home/tt/.cache/$COURSE-config"
|
||||||
GRADING_REPO_PATH="/home/tt/.cache/$COURSE-joj"
|
GRADING_REPO_PATH="/home/tt/.cache/$COURSE-joj"
|
||||||
GIT_USER="bot-$COURSE"
|
GIT_USER="bot-$COURSE"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user