diff options
author | Michael Forney <mforney@mforney.org> | 2020-01-11 14:59:42 -0800 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2020-01-11 14:59:42 -0800 |
commit | 0516f832b37e2da671eaae12258c227098d85d87 (patch) | |
tree | 6c4ccfe692cb7586ce0f297a9a3318191ca68776 | |
parent | 9f66c14c3f91a48a118c7817f434167b311c3515 (diff) | |
download | rust-installer-0516f832b37e2da671eaae12258c227098d85d87.tar.gz |
Avoid non-standard escape sequences in tr command
POSIX says
The <backslash>-escape sequences in Escape Sequences and
Associated Actions ( '\\', '\a', '\b', '\f', '\n', '\r', '\t',
'\v' ) shall be supported. The results of using any other
character, other than an octal digit, following the <backslash>
are unspecified. Also, if there is no character following the
<backslash>, the results are unspecified.
Instead, just use `--` to separate options and operands, since tr(1)
is required to conform to the Utility Syntax Guidelines.
-rw-r--r-- | install-template.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/install-template.sh b/install-template.sh index adb4563..0856501 100644 --- a/install-template.sh +++ b/install-template.sh @@ -169,7 +169,7 @@ valopt() { local doc="$*" if [ $HELP -eq 0 ] then - local uop=$(echo $op | tr '[:lower:]' '[:upper:]' | tr '\-' '\_') + local uop=$(echo $op | tr '[:lower:]' '[:upper:]' | tr -- '-' '_') local v="CFG_${uop}" eval $v="$default" for arg in $CFG_ARGS |