Tweaking stagit-gopher create. - infrastructure - Unnamed repository; edit this… | |
Log | |
Files | |
Refs | |
README | |
--- | |
commit 733be92f94dbde14f57aca10a72bb12369b2749b | |
parent 41d71f5056e89db27e24699a494818ce8f15733f | |
Author: Jay Scott <[email protected]> | |
Date: Sat, 4 Feb 2023 16:08:25 +0000 | |
Tweaking stagit-gopher create. | |
Diffstat: | |
M ansible/roles/stagit/templates/sta… | 32 ++++++++++++++++++---------… | |
1 file changed, 19 insertions(+), 13 deletions(-) | |
--- | |
diff --git a/ansible/roles/stagit/templates/stagit_create.sh.j2 b/ansible/roles… | |
@@ -10,23 +10,29 @@ stagitdir=$(printf "%s" "${stagitdir}" | sed 's@[/]*$@@g') | |
rm -rf "{{ stagit_gopher.output_path }}/git/*" | |
-# make index. | |
-/usr/local/bin/stagit-gopher-index -b "${stagitdir}" "${reposdir}/"*/ >"${dest… | |
+/usr/local/bin/stagit-gopher-index -b "${stagitdir}" "${reposdir}/"*.git/ >"${… | |
# make files per repo. | |
for dir in "${reposdir}/"*/; do | |
- # strip .git suffix. | |
- r=$(basename "${dir}") | |
- d=$(basename "${dir}" ".git") | |
- printf "%s... " "${d}" | |
+ # strip .git suffix. | |
+ r=$(basename "${dir}") | |
+ d=$(basename "${dir}" ".git") | |
+ printf "%s... " "${d}" | |
- mkdir -p "${destdir}/${d}" | |
- cd "${destdir}/${d}" || continue | |
- /usr/local/bin/stagit-gopher -b "${stagitdir}/${d}" \ | |
- -u "gopher://jay.scot/1/git/$d/" "${reposdir}/${r}" | |
+ mkdir -p "${destdir}/${d}" | |
+ cd "${destdir}/${d}" || continue | |
- # symlinks | |
- ln -sf log.gph index.gph | |
+ if [ "$d" != "pass" ]; then | |
+ /usr/local/bin/stagit-gopher -b "${stagitdir}/${d}" \ | |
+ -u "gopher://jay.scot/1/git/$d/" "${reposdir}/${r}" | |
- echo "done" | |
+ # symlinks | |
+ ln -sf log.gph index.gph | |
+ | |
+ echo "done" | |
+ else | |
+ echo "skipping" | |
+ fi | |
done | |
+ | |
+ |