summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2012-10-09 10:27:05 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2012-10-09 10:27:05 +0200
commitd61e10d1c9754e292511404a6d3ed02ce071080e (patch)
treefe365392dd8b73a23a0477e4c79378af803ab7af /app
parent978a886908af800a77b6ec3a51e4c6e80a6d6fff (diff)
downloadapp.sh-d61e10d1c9754e292511404a6d3ed02ce071080e.tar.gz
app.sh-d61e10d1c9754e292511404a6d3ed02ce071080e.tar.bz2
app.sh-d61e10d1c9754e292511404a6d3ed02ce071080e.tar.xz
app.sh-d61e10d1c9754e292511404a6d3ed02ce071080e.zip
o More clever ./app list.
Diffstat (limited to 'app')
-rwxr-xr-xapp13
1 files changed, 2 insertions, 11 deletions
diff --git a/app b/app
index 97be044..c6ef8e6 100755
--- a/app
+++ b/app
@@ -352,16 +352,15 @@ method_stop() {
method_list() {
local mode="pretty"
- while getopts "Pn:" opt
+ while getopts "P:n:" opt
do
case $opt in
P)
mode="parseable"
- shift
+ vars="$vars $OPTARG"
;;
n)
filter_name=$OPTARG
- shift
;;
\?)
install_usage "Invalid option: -$OPTARG"
@@ -374,14 +373,6 @@ method_list() {
return
fi
- x="$@"
- if [ -z "$x" ]
- then
- vars="name instance version"
- else
- vars="$@"
- fi
-
if [ $mode = "pretty" ]
then
printf "%-20s %-20s %-20s\n" "Name" "Instance" "Version"