summaryrefslogtreecommitdiff
path: root/utils/sb2-config
diff options
context:
space:
mode:
authorembdev <embdev@panicking.retis>2008-12-03 09:14:47 +0100
committerLauri Leukkunen <lle@rahina.org>2008-12-07 04:56:35 +0200
commitf890188471132ee2d59a23b6c07e29f31dbc00f0 (patch)
tree3c1f13e3396653b0056e3347791e8db69a9b1702 /utils/sb2-config
parentd28474600bf7cb8284b9f147da829204fdb85959 (diff)
sb2-config -l add return value in case of error.
Signed-off-by: Michael Trimarchi <trimarchimichael@yahoo.it>
Diffstat (limited to 'utils/sb2-config')
-rwxr-xr-xutils/sb2-config10
1 files changed, 8 insertions, 2 deletions
diff --git a/utils/sb2-config b/utils/sb2-config
index 4e408c6..2658304 100755
--- a/utils/sb2-config
+++ b/utils/sb2-config
@@ -38,8 +38,14 @@ function version()
function list_targets()
{
- for f in $(find $HOME/.scratchbox2/ -maxdepth 1 -mindepth 1 -type d -and ! -name '*.tmp-pkg-db.*'); do echo $(basename $f); done
- exit 0
+ list=$(find $HOME/.scratchbox2/ -maxdepth 1 -mindepth 1 \
+ -type d -and \
+ ! -name '*.tmp-pkg-db.*')
+ if [ $? == 0 ]; then
+ for f in $list; do echo $(basename $f); done
+ exit 0
+ fi
+ exit 1
}
function write_config()