Introduction
Introduction Statistics Contact Development Disclaimer Help
timprove example: strip .git suffix - stagit - static git page generator
git clone git://src.adamsgaard.dk/stagit
Log
Files
Refs
README
LICENSE
---
commit 44a49f51db565cbfc31f31393d8dcdec1cdc8167
parent 837427b09ea3a592e9b364b180c2011b517ab2c8
Author: Hiltjo Posthuma <[email protected]>
Date: Sun, 29 May 2016 13:06:32 +0200
improve example: strip .git suffix
stagit-index and stagit strip the .git suffix so also strip it from the
directory for the possible www root.
Thanks to ng0 for reporting it!
Diffstat:
M example.sh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/example.sh b/example.sh
t@@ -22,12 +22,13 @@ find . -maxdepth 1 -type d | grep -v "^.$" | sort | xargs …
# make files per repo.
cd "${reposdir}"
find . -maxdepth 1 -type d | grep -v "^.$" | sort | while read -r dir; do
- d=$(basename "${dir}")
+ r=$(basename "${dir}")
+ d=$(basename "${dir}" ".git")
printf "%s... " "${d}"
mkdir -p "${curdir}/${d}"
cd "${curdir}/${d}"
- stagit -c ".cache" "${reposdir}/${d}"
+ stagit -c ".cache" "${reposdir}/${r}"
# symlinks
ln -sf log.html index.html
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.