plushu / plushu-app-long-opt

Adds the ability to specify an "--app" option to all Plushu commands
MIT License
0 stars 0 forks source link

Implementing PLUSHU_APP_NAME #2

Closed stuartpb closed 10 years ago

stuartpb commented 10 years ago

Changes need to be made in:

and will need to be carried through for any future plugins that take app specifications.

The pattern is something like this:

if [[ -n "$PLUSHU_APP_NAME" ]]; then
  app=$PLUSHU_APP_NAME
elif [[ -n "$2" ]]; then
  app=$2
  shift
else
  echo "Missing app name" >&2
  exit 1
fi

and further arguments are defined from $2 on.

Once this is integrated into the correct plugins, it should be added to:

stuartpb commented 10 years ago

Renamed the variable to match PLUSHU_REPO_NAME etc.

stuartpb commented 10 years ago

The commands in plushu-dokku and all of plushu_addons aren't really written yet, so this is pretty much ready to move forward.