summaryrefslogtreecommitdiff
path: root/build-aux/vc-list-files
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-04-25 15:32:33 +0200
committerJim Meyering <meyering@redhat.com>2009-04-25 15:32:33 +0200
commit0bb361f27252ad8308f8e208af76536821ce29ce (patch)
tree8197d77189565de102a769e20aaff684de84ce13 /build-aux/vc-list-files
parent496fee86d6ccab0e07f1c83a5cf880f16a6bff11 (diff)
downloadgnulib-0bb361f27252ad8308f8e208af76536821ce29ce.tar.gz
vc-list-files: fix another quoting bug
* build-aux/vc-list-files: Avoid sed backslash expansion of pathological directory names.
Diffstat (limited to 'build-aux/vc-list-files')
-rwxr-xr-xbuild-aux/vc-list-files6
1 files changed, 4 insertions, 2 deletions
diff --git a/build-aux/vc-list-files b/build-aux/vc-list-files
index 08dc8ab2f4..9376e3dc2f 100755
--- a/build-aux/vc-list-files
+++ b/build-aux/vc-list-files
@@ -72,13 +72,15 @@ esac
test "x$dir" = x && dir=.
if test -d .git; then
- test "x$dir" = x. && dir= || dir="$dir/"
+ test "x$dir" = x. \
+ && dir= sed_esc= \
+ || dir="$dir/" sed_esc=`echo "$dir"|sed 's,\([\\/]\),\\\\\1,g'`
# Ignore git symlinks - either they point into the tree, in which case
# we don't need to visit the target twice, or they point somewhere
# else (often into a submodule), in which case the content does not
# belong to this package.
eval exec git ls-tree -r 'HEAD:"$dir"' \
- \| sed -n '"s!^100[^ ]*.!$dir!p"' $postprocess
+ \| sed -n '"s/^100[^ ]*./$sed_esc/p"' $postprocess
elif test -d .hg; then
eval exec hg locate '"$dir/*"' $postprocess
elif test -d .bzr; then