Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use `$OSTYPE` instead of `$MACHTYPE`

`$OSTYPE` is a better descriptor of the operating system. Let's not abuse
the content of `$MACHTYPE` that is meant to describe the architecture.
  • Loading branch information...
commit 4f282ac94a6dc00cbffa2adbe1971360ddd44f43 1 parent 8c1f120
@gioele authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 bashrc_dispatch
View
6 bashrc_dispatch
@@ -25,15 +25,15 @@ BASHRC_DISPATCH_PID=$$
SHELL_PLATFORM='OTHER'
-case "$MACHTYPE" in
+case "$OSTYPE" in
*'linux'* ) SHELL_PLATFORM='LINUX' ;;
*'darwin'* ) SHELL_PLATFORM='OSX' ;;
*'freebsd'* ) SHELL_PLATFORM='BSD' ;;
esac
if ! type -p shell_is_login ; then
- shell_is_linux () { [[ "$MACHTYPE" == *'linux'* ]] ; }
- shell_is_osx () { [[ "$MACHTYPE" == *'darwin'* ]] ; }
+ shell_is_linux () { [[ "$OSTYPE" == *'linux'* ]] ; }
+ shell_is_osx () { [[ "$OSTYPE" == *'darwin'* ]] ; }
shell_is_login () { shopt -q login_shell ; }
shell_is_interactive () { test -n "$PS1" ; }
shell_is_script () { ! shell_is_interactive ; }
Please sign in to comment.
Something went wrong with that request. Please try again.