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!
This commit is contained in:
Hiltjo Posthuma 2016-05-29 13:06:32 +02:00
parent 837427b09e
commit 44a49f51db

View file

@ -22,12 +22,13 @@ find . -maxdepth 1 -type d | grep -v "^.$" | sort | xargs stagit-index > "${curd
# 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