Skip to content

Commit

Permalink
Back to setting command as part of args processing.
Browse files Browse the repository at this point in the history
  • Loading branch information
wayneeseguin committed Sep 7, 2011
1 parent 2376982 commit ba90d68
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions core/api/shell/package/functions
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,9 @@ package()

while (( $# ))
do
_token="$1" && shift
if [[ -z "${_command}" ]]
then
_command="${_token}"
fi
case "${_token}" in
(is)
_command=is
case "$1" in
(active|installed)
_subcommand="$1"
Expand All @@ -74,6 +70,7 @@ package()
shift || fail "Message must be given following keyword 'message'"
;;
(configure)
_command=configure
case "$1" in
(flag|flags)
_subcommand="$1"
Expand All @@ -86,13 +83,15 @@ package()
esac
;;
(make)
_command=make
if [[ "$1" == install ]]
then
_subcommand="install"
shift
fi
;;
(activate)
_command=activate
if [[ "$1" == first ]]
then
_subcommand=first
Expand Down

0 comments on commit ba90d68

Please sign in to comment.