aboutsummaryrefslogtreecommitdiff
path: root/.app/lib/app-common
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2012-10-14 10:32:24 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2012-10-14 10:32:24 +0200
commit44b2652f72402b5155f99b9550296c4337689491 (patch)
treeb4f2a15f8654e1bbae300a11cddad7cff6f258ff /.app/lib/app-common
parent7bb8f6710c94260f05f6d88910864e2b25484e6c (diff)
downloadapp.sh-44b2652f72402b5155f99b9550296c4337689491.tar.gz
app.sh-44b2652f72402b5155f99b9550296c4337689491.tar.bz2
app.sh-44b2652f72402b5155f99b9550296c4337689491.tar.xz
app.sh-44b2652f72402b5155f99b9550296c4337689491.zip
o Tests for 'list' and 'list-versions'.
o Adding support for -i for 'list'.
Diffstat (limited to '.app/lib/app-common')
-rw-r--r--.app/lib/app-common9
1 files changed, 7 insertions, 2 deletions
diff --git a/.app/lib/app-common b/.app/lib/app-common
index 11e724b..584e053 100644
--- a/.app/lib/app-common
+++ b/.app/lib/app-common
@@ -33,8 +33,8 @@ assert_is_instance() {
}
list_apps() {
- filter_name=$1
- shift
+ filter_name=$1; shift
+ filter_instnace=$1; shift
vars="$@"
sort $BASEDIR/.app/var/list | while read line
@@ -46,6 +46,11 @@ list_apps() {
continue
fi
+ if [ -n "$filter_instance" -a "$filter_instance" != "$instance" ]
+ then
+ continue
+ fi
+
local line=""
IFS=" "; for var in $vars
do