diff options
author | Charles Duffy <chaduffy@cisco.com> | 2016-01-20 05:15:55 +0000 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2016-02-24 15:30:00 +0800 |
commit | c796b65c1ea43b7d29a456e2715b626be64eb739 (patch) | |
tree | 5c8294acdd2a885bc50dd487146a7138da37301e /BaseTools | |
parent | 95b952db0be8052ad9bcfb77db1e96ea93753882 (diff) | |
download | edk2-platforms-c796b65c1ea43b7d29a456e2715b626be64eb739.tar.xz |
BaseTools: Improve LzmaF86Compress wrapper
- Remove test usage declared obsolescent by POSIX
- Pass argv array through as literal rather than forming into a string, then
string-splitting and glob-expanding same.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Charles Duffy <chaduffy@cisco.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19697 6f19259b-4bc3-4df7-8a09-765794883524
(cherry picked from commit 8d0776f3e60482ed621e45b2b52db8a604d7e5a2)
Diffstat (limited to 'BaseTools')
-rwxr-xr-x | BaseTools/Bin/CYGWIN_NT-5.1-i686/LzmaF86Compress | 15 | ||||
-rwxr-xr-x | BaseTools/BinWrappers/PosixLike/LzmaF86Compress | 15 |
2 files changed, 16 insertions, 14 deletions
diff --git a/BaseTools/Bin/CYGWIN_NT-5.1-i686/LzmaF86Compress b/BaseTools/Bin/CYGWIN_NT-5.1-i686/LzmaF86Compress index c3e49cf29d..50af530cbd 100755 --- a/BaseTools/Bin/CYGWIN_NT-5.1-i686/LzmaF86Compress +++ b/BaseTools/Bin/CYGWIN_NT-5.1-i686/LzmaF86Compress @@ -12,11 +12,12 @@ # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # -for arg in $*; do - if [ "arg" = "-e" -o "arg" = "-d" ]; then - FLAG=--f86 - break; - fi -done +for arg; do + case $arg in + -e|-d) + set -- "$@" --f86 + break + ;; +esac -LzmaCompress $* $FLAG +exec LzmaCompress "$@" diff --git a/BaseTools/BinWrappers/PosixLike/LzmaF86Compress b/BaseTools/BinWrappers/PosixLike/LzmaF86Compress index 18946a4d2d..50af530cbd 100755 --- a/BaseTools/BinWrappers/PosixLike/LzmaF86Compress +++ b/BaseTools/BinWrappers/PosixLike/LzmaF86Compress @@ -12,11 +12,12 @@ # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # -for arg in $*; do - if [ "$arg" = "-e" -o "$arg" = "-d" ]; then - FLAG=--f86 - break; - fi -done +for arg; do + case $arg in + -e|-d) + set -- "$@" --f86 + break + ;; +esac -LzmaCompress $* $FLAG +exec LzmaCompress "$@" |