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

View File

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