From d61e10d1c9754e292511404a6d3ed02ce071080e Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Tue, 9 Oct 2012 10:27:05 +0200 Subject: o More clever ./app list. --- app | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'app') 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" -- cgit v1.2.3