audk/BaseTools/BinWrappers/PosixLike
Charles Duffy 6928c1d3ee BaseTools: Improve shell wrappers for Python build commands
- Use `python2` executable if it exists, to avoid breakage on systems (such as
  Arch Linux) where `python` is Python 3.
- Quote all references to `$0`, for safety when located in a directory
  containing spaces in its name.
- Use the `exec` shell command to avoid leaving the shell wrapper in the
  process table when invoking the actual build tool.
- Use `"$@"` rather than `$*` to pass arguments through directly rather than
  concatenating to a string, and then string-splitting and glob-expanding its
  contents.
- Use `$BASH_SOURCE` in preference to `$0` (which is only guaranteed to be
  process name, *not* source path).

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@19694 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-20 05:09:06 +00:00
..
BPDG BaseTools: Improve shell wrappers for Python build commands 2016-01-20 05:09:06 +00:00
BootSectImage
Ecc BaseTools: Improve shell wrappers for Python build commands 2016-01-20 05:09:06 +00:00
EfiLdrImage
EfiRom
GenCrc32
GenDepex BaseTools: Improve shell wrappers for Python build commands 2016-01-20 05:09:06 +00:00
GenFds BaseTools: Improve shell wrappers for Python build commands 2016-01-20 05:09:06 +00:00
GenFfs
GenFv
GenFw
GenPage
GenPatchPcdTable BaseTools: Improve shell wrappers for Python build commands 2016-01-20 05:09:06 +00:00
GenSec
GenVtf
GnuGenBootSector
LzmaCompress
LzmaF86Compress
PatchPcdValue BaseTools: Improve shell wrappers for Python build commands 2016-01-20 05:09:06 +00:00
Split
TargetTool BaseTools: Improve shell wrappers for Python build commands 2016-01-20 05:09:06 +00:00
TianoCompress
Trim BaseTools: Improve shell wrappers for Python build commands 2016-01-20 05:09:06 +00:00
UPT BaseTools: Improve shell wrappers for Python build commands 2016-01-20 05:09:06 +00:00
VfrCompile
VolInfo
build BaseTools: Improve shell wrappers for Python build commands 2016-01-20 05:09:06 +00:00