summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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()