diff options
author | NIIBE Yutaka <[email protected]> | 2018-09-20 03:45:36 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2018-09-20 03:45:36 +0000 |
commit | a338801aa4bac9a3551729598bcb0ca41882cdb9 (patch) | |
tree | 69a86c8b10a6ac80bb87af3b2e4758478a3fbeb8 | |
parent | gpg-error-config: Fix a variable name for zsh. (diff) | |
download | libgpg-error-a338801aa4bac9a3551729598bcb0ca41882cdb9.tar.gz libgpg-error-a338801aa4bac9a3551729598bcb0ca41882cdb9.zip |
gpg-error-config: Use expr to remove var in expression.
* src/gpg-error-config-new.in (remove_var_expr): Use expr.
--
For OpenBSD's sh, it results "bad substitusion". Now, we use expr.
Tested on OpenBSD 6.2.
Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r-- | src/gpg-error-config-new.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gpg-error-config-new.in b/src/gpg-error-config-new.in index 1a03cf9..3b31a68 100644 --- a/src/gpg-error-config-new.in +++ b/src/gpg-error-config-new.in @@ -50,7 +50,7 @@ remove_var_expr () { ___varname=$1 shift - eval echo \"\${@#\\\$\\\{$___varname\\\}}\" + expr "$*" : "\${$___varname}\\(.*\\)" } # Given a string, substitute variables. |