Skip to content

Commit

Permalink
os type is
Browse files Browse the repository at this point in the history
  • Loading branch information
mpapis committed Nov 26, 2011
1 parent e607c44 commit 127d49d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/api/shell/os/functions
Expand Up @@ -28,6 +28,7 @@ os()
typeset -a _params __os_commands

__os_commands=(
"is=type is"
"arch capable"
"arch is=arch type is"
"arch type"
Expand All @@ -46,7 +47,7 @@ os()
fi

case "${_command}" in
(is)
(type.is)
_os="$1"
(( $# )) && shift || __sm.log.fail "System name must follow keywords 'is';"\
"os is <linux|darwin|bsd|solaris|aix>"
Expand All @@ -65,10 +66,10 @@ os()
shift $#

case "${_command}" in
(is)
(type.is)
case "${_os}" in
(linux|bsd|darwin|solaris|aix)
__sm.os.is ${_os}
__sm.os.type.is ${_os}
;;
(*)
__sm.log.fail "Unhandled os '${_os}'"
Expand Down

0 comments on commit 127d49d

Please sign in to comment.