summaryrefslogtreecommitdiffstats
path: root/BaseTools/BinWrappers
diff options
context:
space:
mode:
authorCharles Duffy <chaduffy@cisco.com>2016-01-20 05:15:55 +0000
committeryzhu52 <yzhu52@Edk2>2016-01-20 05:15:55 +0000
commit8d0776f3e60482ed621e45b2b52db8a604d7e5a2 (patch)
tree69164530180495a11247d3be9376a5aeab0fb8b5 /BaseTools/BinWrappers
parent87157f76f05469dc5c349fe53c4402e408136f2e (diff)
downloadedk2-8d0776f3e60482ed621e45b2b52db8a604d7e5a2.tar.gz
edk2-8d0776f3e60482ed621e45b2b52db8a604d7e5a2.tar.bz2
edk2-8d0776f3e60482ed621e45b2b52db8a604d7e5a2.zip
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
Diffstat (limited to 'BaseTools/BinWrappers')
-rwxr-xr-xBaseTools/BinWrappers/PosixLike/LzmaF86Compress15
1 files changed, 8 insertions, 7 deletions
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 "$@"