summaryrefslogtreecommitdiff
path: root/example.sh
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2016-05-29 13:06:32 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2016-05-29 13:06:32 +0200
commit44a49f51db565cbfc31f31393d8dcdec1cdc8167 (patch)
treefc8d481486b89db1ad9ba0de4b3eef9d5e23784c /example.sh
parent837427b09ea3a592e9b364b180c2011b517ab2c8 (diff)
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 (limited to 'example.sh')
-rw-r--r--example.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/example.sh b/example.sh
index 6f4ea2d..e85b50c 100644
--- a/example.sh
+++ b/example.sh
@@ -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