mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-04-20 07:21:23 +02:00
fix command_version on Darwin/macOS 11
Current output of `uname` on Darwin/macOS 11 is only `Darwin`, which breaks the premisse used in `command_version()`. This update adds `Darwin` alongside `BSD`.
This commit is contained in:
committed by
Lukas Schauer
parent
91cccc0c23
commit
6ee4ae508e
@@ -1440,7 +1440,7 @@ command_version() {
|
||||
revision="$(cd "${SCRIPTDIR}"; git rev-parse HEAD 2>/dev/null || echo "unknown")"
|
||||
echo "GIT-Revision: ${revision}"
|
||||
echo ""
|
||||
if [[ "${OSTYPE}" =~ "BSD" ]]; then
|
||||
if [[ "${OSTYPE}" =~ (BSD|Darwin) ]]; then
|
||||
echo "OS: $(uname -sr)"
|
||||
elif [[ -e /etc/os-release ]]; then
|
||||
( . /etc/os-release && echo "OS: $PRETTY_NAME" )
|
||||
@@ -1453,7 +1453,7 @@ command_version() {
|
||||
[[ -n "${BASH_VERSION:-}" ]] && echo " bash: ${BASH_VERSION}"
|
||||
[[ -n "${ZSH_VERSION:-}" ]] && echo " zsh: ${ZSH_VERSION}"
|
||||
echo " curl: ${CURL_VERSION}"
|
||||
if [[ "${OSTYPE}" =~ "BSD" ]]; then
|
||||
if [[ "${OSTYPE}" =~ (BSD|Darwin) ]]; then
|
||||
echo " awk, sed, mktemp, grep, diff: BSD base system versions"
|
||||
else
|
||||
echo " awk: $(awk -W version 2>&1 | head -n1)"
|
||||
|
||||
Reference in New Issue
Block a user