diff options
| author | Alex Pooley (@zuedev) <zuedev@gmail.com> | 2026-05-07 13:40:38 +0100 |
|---|---|---|
| committer | Alex Pooley (@zuedev) <zuedev@gmail.com> | 2026-05-07 13:40:38 +0100 |
| commit | bebf6d894f680376f5bed85bca068f4c267ff957 (patch) | |
| tree | 0ec3a66d78558e3a1d018b6b3a9d752959ce9a24 | |
| parent | 28b81d494cd35a3712ede953d1324e6098f9fc2e (diff) | |
| download | git.zue.dev-bebf6d894f680376f5bed85bca068f4c267ff957.tar git.zue.dev-bebf6d894f680376f5bed85bca068f4c267ff957.tar.gz git.zue.dev-bebf6d894f680376f5bed85bca068f4c267ff957.tar.bz2 git.zue.dev-bebf6d894f680376f5bed85bca068f4c267ff957.tar.xz git.zue.dev-bebf6d894f680376f5bed85bca068f4c267ff957.zip | |
add debug echos
| -rw-r--r-- | scripts/gitinfo.bash | 9 |
1 files changed, 9 insertions, 0 deletions
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 |
