From bebf6d894f680376f5bed85bca068f4c267ff957 Mon Sep 17 00:00:00 2001 From: "Alex Pooley (@zuedev)" Date: Thu, 7 May 2026 13:40:38 +0100 Subject: add debug echos --- scripts/gitinfo.bash | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'scripts') diff --git a/scripts/gitinfo.bash b/scripts/gitinfo.bash index 43b284f..61d388b 100644 --- a/scripts/gitinfo.bash +++ b/scripts/gitinfo.bash @@ -1,9 +1,14 @@ #/bin/bash for repository in /repositories/*; do + echo "Processing repository: $(basename "$repository")" + cd /repositories/$(basename "$repository") + gitinfoExists=$(git ls-tree HEAD -- .gitinfo 2>/dev/null) + echo "gitinfoExists: $gitinfoExists" + # does gitinfo exist? if [ -z "$gitinfoExists" ]; then echo "No .gitinfo found for $(basename "$repository"). Blanking description." @@ -13,9 +18,13 @@ for repository in /repositories/*; do gitinfoContents=$(git cat-file -p @:.gitinfo) + echo "gitinfoContents: $gitinfoContents" + # extract description from gitinfo (json format) description=$(echo "$gitinfoContents" | grep -oP '"description":\s*"\K[^"]+') + echo "Extracted description: $description" + # write description to repository description file echo "$description" > /repositories/$(basename "$repository")/description done \ No newline at end of file -- cgit v1.2.3