diff options
author | Bruno Haible <bruno@clisp.org> | 2019-02-24 15:18:24 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2019-02-24 15:18:24 +0100 |
commit | 82519af2d88067e8e8e2fe620bdfefa7e50b658d (patch) | |
tree | bd01636ac9ea24c105388db104f787acde775e91 /build-aux/install-reloc | |
parent | c3a4785d35831c09f526a9bc705e89b699ba3682 (diff) | |
download | gnulib-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-x | build-aux/install-reloc | 4 |
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' "$@" } |