mirror of
git://code.qt.io/qt/qt5.git
synced 2026-01-06 06:56:53 +08:00
Alias expansion is not working reliably in non-interactive shells
It happened that old bash version on macOS the alias was not being expanded for non-interactive shells running under "bash" but was being expanded fine when under "sh". Using functions is the recommended way. Here we define a function conditionally. Change-Id: I607b265cb9e88b2b529ed170121e5a0833003acd Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
This commit is contained in:
@@ -39,10 +39,12 @@
|
||||
# based on the SHA length). Target filename should also be given.
|
||||
|
||||
############################ BOILERPLATE ###############################
|
||||
command -v sha1sum >/dev/null || alias sha1sum='shasum -a 1'
|
||||
command -v sha256sum >/dev/null || alias sha256sum='shasum -a 256'
|
||||
command -v sha384sum >/dev/null || alias sha384sum='shasum -a 384'
|
||||
command -v sha512sum >/dev/null || alias sha512sum='shasum -a 512'
|
||||
|
||||
command -v sha1sum >/dev/null || sha1sum () { shasum -a 1 "$@" ; }
|
||||
command -v sha256sum >/dev/null || sha256sum () { shasum -a 256 "$@" ; }
|
||||
command -v sha384sum >/dev/null || sha384sum () { shasum -a 384 "$@" ; }
|
||||
command -v sha512sum >/dev/null || sha512sum () { shasum -a 512 "$@" ; }
|
||||
|
||||
########################################################################
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user