commit 745403a27b1585a5369d3312f207ad7e3830c608
parent ca5f6f2c62bd43443b813f796290a24030576852
Author: kst
Date: 2020-07-17 23:49Z

escape before xargs

Diffstat:
Mstagit-post-receive | 13++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/stagit-post-receive b/stagit-post-receive @@ -53,11 +53,14 @@ if [ "$force" = "1" ]; then fi # make index for public repos -find "${repos_root}/." ! -name . -prune \ - -type d -name "*.git" \ - -exec test ! -e "{}/stagit-no-index" \; \ - -print | \ - sort -f | xargs stagit-index > "${web_root}/index.html" +find "${repos_root}/." ! -name . -prune \ + -type d -name "*.git" \ + -exec test ! -e "{}/stagit-no-index" \;\ + -print \ + | sort -f \ + | sed -e 's/"/"\\""/g' -e 's/.*/"&"/' \ + | xargs stagit-index \ + > "${web_root}/index.html" # make pages. stagit -c "$cachefile" "$repo_dir"