Skip to content

Commit 58fd4b1

Browse files
Copilotvgoehler
andauthored
Fix grep -v '\s*#' → '^[[:space:]]*#' in all courses.conf lookups
Agent-Logs-Url: https://github.com/TUBAF-IfI-LiaScript/TUBAF-IfI-LiaScript.github.io/sessions/bc7eb133-ca30-49ec-ab0e-448431d56877 Co-authored-by: vgoehler <1705385+vgoehler@users.noreply.github.com>
1 parent a870c93 commit 58fd4b1

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ mark-changed:
7979

8080
update-cache-%:
8181
@YAML_HASH=$$(sha256sum $*.yml 2>/dev/null | cut -d' ' -f1 || echo "missing"); \
82-
REPO_NAME=$$(grep -v '^\s*#' scripts/courses.conf | grep '^$*:' | cut -d: -f2 | tr -d '[:space:]' || true); \
82+
REPO_NAME=$$(grep -v '^[[:space:]]*#' scripts/courses.conf | grep '^$*:' | cut -d: -f2 | tr -d '[:space:]' || true); \
8383
if [ -n "$$REPO_NAME" ]; then \
8484
API_URL="https://api.github.com/repos/TUBAF-IfI-LiaScript/VL_$${REPO_NAME}/commits/master"; \
8585
API_RESPONSE=$$(curl -sL --connect-timeout 10 "$$API_URL" 2>/dev/null); \
@@ -184,7 +184,7 @@ status:
184184
else \
185185
echo " 📁 No assets"; \
186186
fi; \
187-
repo_name=$$(grep -v '^\s*#' scripts/courses.conf | grep "^$$course:" | cut -d: -f2 | tr -d '[:space:]' || true); \
187+
repo_name=$$(grep -v '^[[:space:]]*#' scripts/courses.conf | grep "^$$course:" | cut -d: -f2 | tr -d '[:space:]' || true); \
188188
if [ -n "$$repo_name" ]; then \
189189
echo " 🌐 Monitoring: VL_$$repo_name"; \
190190
else \

scripts/check_changes.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ YAML_HASH=$(sha256sum "$YAML_FILE" 2>/dev/null | cut -d' ' -f1 || echo "missing"
2929
# Get remote repository name from central config
3030
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
3131
COURSES_CONF="${SCRIPT_DIR}/courses.conf"
32-
REPO_NAME=$(grep -v '^\s*#' "$COURSES_CONF" | grep "^${COURSE}:" | cut -d: -f2 | tr -d '[:space:]' || true)
32+
REPO_NAME=$(grep -v '^[[:space:]]*#' "$COURSES_CONF" | grep "^${COURSE}:" | cut -d: -f2 | tr -d '[:space:]' || true)
3333

3434
if [ -n "$REPO_NAME" ]; then
3535
echo "🌐 Checking VL_${REPO_NAME} repository..."

scripts/download_upstream_pdfs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
2626
COURSES_CONF="${SCRIPT_DIR}/courses.conf"
2727

2828
# Map course name → upstream repository name via central config
29-
REPO_NAME=$(grep -v '^\s*#' "$COURSES_CONF" | grep "^${COURSE}:" | cut -d: -f2 | tr -d '[:space:]' || true)
29+
REPO_NAME=$(grep -v '^[[:space:]]*#' "$COURSES_CONF" | grep "^${COURSE}:" | cut -d: -f2 | tr -d '[:space:]' || true)
3030
if [ -z "$REPO_NAME" ]; then
3131
echo "ℹ️ No upstream repo mapped for course '$COURSE'" >&2
3232
exit 1

scripts/generate_courses.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ for course in "${course_list[@]}"; do
6262
;;
6363
*)
6464
# If the course has an upstream repo mapping it is a full SCORM/PDF course
65-
_repo=$(grep -v '^\s*#' "$SCRIPT_DIR/courses.conf" | grep "^${course}:" | cut -d: -f2 | tr -d '[:space:]' || true)
65+
_repo=$(grep -v '^[[:space:]]*#' "$SCRIPT_DIR/courses.conf" | grep "^${course}:" | cut -d: -f2 | tr -d '[:space:]' || true)
6666
if [ -n "$_repo" ]; then
6767
if [ "$needs_pdfs" = true ]; then
6868
echo "🔨 Generating course with PDFs..."

0 commit comments

Comments
 (0)