commit 64de96fd44c906f17fb5124ed11c89d9b2fcb08f
parent b831ce30c99b8d278f8917cf5c56ea5fa4ccf8a0
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 30 Jul 2017 17:35:33 +0200
example scripts: fix sed expression, dont interpret as variable
Diffstat:
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"