build(macos): do not depend on gsed
This commit is contained in:
parent
495ef7f301
commit
eb03e6ca9b
|
@ -10,8 +10,8 @@ UNAME="$(uname -s)"
|
|||
case "$UNAME" in
|
||||
Darwin)
|
||||
DIST='macos'
|
||||
VERSION_ID=$(sw_vers | gsed -n '/^ProductVersion:/p' | gsed -r 's/ProductVersion:(.*)/\1/g' | gsed -r 's/([0-9]+).*/\1/g' | gsed 's/^[ \t]*//g')
|
||||
SYSTEM="$(echo "${DIST}${VERSION_ID}" | gsed -r 's/([a-zA-Z]*)-.*/\1/g')"
|
||||
VERSION_ID="$(sw_vers | grep 'ProductVersion' | cut -d':' -f 2 | cut -d'.' -f1 | tr -d ' \t')"
|
||||
SYSTEM="${DIST}${VERSION_ID}"
|
||||
;;
|
||||
Linux)
|
||||
if grep -q -i 'rhel' /etc/*-release; then
|
||||
|
|
Loading…
Reference in New Issue