- 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
# 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 "$@"
# 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 "$@"