Introduction
Introduction Statistics Contact Development Disclaimer Help
example scripts: fix sed expression, dont interpret as variable - stagit-gopher…
git clone git://git.codemadness.org/stagit-gopher
Log
Files
Refs
README
LICENSE
---
commit 64de96fd44c906f17fb5124ed11c89d9b2fcb08f
parent b831ce30c99b8d278f8917cf5c56ea5fa4ccf8a0
Author: Hiltjo Posthuma <[email protected]>
Date: Sun, 30 Jul 2017 17:35:33 +0200
example scripts: fix sed expression, dont interpret as variable
Diffstat:
M example_create.sh | 3 +++
M example_post-receive.sh | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/example_create.sh b/example_create.sh
@@ -17,6 +17,9 @@ gopherdir="/var/gopher"
stagitdir="/scm"
destdir="${gopherdir}/${stagitdir}"
+# remove /'s at the end.
+stagitdir=$(printf "%s" "${stagitdir}" | sed 's@[/]*$@@g')
+
# make index.
stagit-gopher-index -b "${stagitdir}" "${reposdir}/"*/ > "${destdir}/index.gph"
diff --git a/example_post-receive.sh b/example_post-receive.sh
@@ -54,7 +54,7 @@ if test "${force}" = "1"; then
fi
# remove /'s at the end.
-stagitdir=$(printf "%s" "${stagitdir}" | sed "s@[/]*$@@g")
+stagitdir=$(printf "%s" "${stagitdir}" | sed 's@[/]*$@@g')
# make index.
stagit-gopher-index -b "${stagitdir}" "${reposdir}/"*/ > "${destdir}/index.gph"
You are viewing proxied material from codemadness.org. 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.