|
|
@ -30,27 +30,27 @@ function coalesce { |
|
|
|
return 1 |
|
|
|
return 1 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
# is true on MacOS Darwin |
|
|
|
# Checks if running on macOS Darwin. |
|
|
|
function is-darwin { |
|
|
|
function is-darwin { |
|
|
|
[[ "$OSTYPE" == darwin* ]] |
|
|
|
[[ "$OSTYPE" == darwin* ]] |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
# is true on Linux's |
|
|
|
# Checks if running on Linux. |
|
|
|
function is-linux { |
|
|
|
function is-linux { |
|
|
|
[[ "$OSTYPE" == linux* ]] |
|
|
|
[[ "$OSTYPE" == linux* ]] |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
# is true on BSD's |
|
|
|
# Checks if running on BSD. |
|
|
|
function is-bsd { |
|
|
|
function is-bsd { |
|
|
|
[[ "$OSTYPE" == *bsd* ]] |
|
|
|
[[ "$OSTYPE" == *bsd* ]] |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
# is true on Cygwin (Windows) |
|
|
|
# Checks if running on Cygwin (Windows). |
|
|
|
function is-cygwin { |
|
|
|
function is-cygwin { |
|
|
|
[[ "$OSTYPE" == cygwin* ]] |
|
|
|
[[ "$OSTYPE" == cygwin* ]] |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
# is true on termux (Android) |
|
|
|
# Checks if running on termux (Android). |
|
|
|
function is-termux { |
|
|
|
function is-termux { |
|
|
|
[[ "$OSTYPE" == linux-android ]] |
|
|
|
[[ "$OSTYPE" == linux-android ]] |
|
|
|
} |
|
|
|
} |
|
|
|