Merge pull request #14 from d3v1an7/patch-1

switch $(uname) to $OSTYPE in case example
This commit is contained in:
Dylan Araps 2018-06-18 10:49:49 +10:00 committed by GitHub
commit 84f55dcb1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 5 deletions

View File

@ -1376,17 +1376,21 @@ successful command. `:` always succeeds so we can abuse it to store the
variable value.
```shell
# Example snippet from Neofetch.
case "$(uname)" in
"Linux" | "GNU"*)
# Modified snippet from Neofetch.
case "$OSTYPE" in
"darwin"*)
: "MacOS"
;;
"linux"*)
: "Linux"
;;
*"BSD" | "DragonFly" | "Bitrig")
*"bsd"* | "dragonfly" | "bitrig")
: "BSD"
;;
"CYGWIN"* | "MSYS"* | "MINGW"*)
"cygwin" | "msys" | "win32")
: "Windows"
;;