summaryrefslogtreecommitdiff
path: root/build-aux/install-reloc
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2019-02-24 15:18:24 +0100
committerBruno Haible <bruno@clisp.org>2019-02-24 15:18:24 +0100
commit82519af2d88067e8e8e2fe620bdfefa7e50b658d (patch)
treebd01636ac9ea24c105388db104f787acde775e91 /build-aux/install-reloc
parentc3a4785d35831c09f526a9bc705e89b699ba3682 (diff)
downloadgnulib-82519af2d88067e8e8e2fe620bdfefa7e50b658d.tar.gz
relocatable-prog: Improve verbose output.
* build-aux/install-reloc (func_verbose): Escape characters that would be interpreted by the shell.
Diffstat (limited to 'build-aux/install-reloc')
-rwxr-xr-xbuild-aux/install-reloc4
1 files changed, 3 insertions, 1 deletions
diff --git a/build-aux/install-reloc b/build-aux/install-reloc
index e68386e7f2..75c367468e 100755
--- a/build-aux/install-reloc
+++ b/build-aux/install-reloc
@@ -208,7 +208,9 @@ fi
# Outputs a command and runs it.
func_verbose ()
{
- echo "$@"
+ # Make it easy to copy&paste the printed command into a shell in most cases,
+ # by escaping '\\', '"', and '$'. This is not perfect, just good enough.
+ echo "$@" | sed -e 's/\([\\"$]\)/\\\1/g'
"$@"
}