stagit

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!

Hiltjo Posthuma contact@arjunchoudhary.com

commit: 259ea1e parent: d165c05
1 files changed, 3 insertions(+), 2 deletions(-)
Mexample.sh+3-2
M · example.sh +3, -2
 1@@ -22,12 +22,13 @@ find . -maxdepth 1 -type d | grep -v "^.$" | sort | xargs stagit-index > "${curd
 2 # make files per repo.
 3 cd "${reposdir}"
 4 find . -maxdepth 1 -type d | grep -v "^.$" | sort | while read -r dir; do
 5-	d=$(basename "${dir}")
 6+	r=$(basename "${dir}")
 7+	d=$(basename "${dir}" ".git")
 8 	printf "%s... " "${d}"
 9 
10 	mkdir -p "${curdir}/${d}"
11 	cd "${curdir}/${d}"
12-	stagit -c ".cache" "${reposdir}/${d}"
13+	stagit -c ".cache" "${reposdir}/${r}"
14 
15 	# symlinks
16 	ln -sf log.html index.html