Hi all,
I'm writing a plugin that use sbox2 and I think that the sb2-conf -l may
return an error code.
Michael
>From 50e767acc359ccb2c01dccca771272be2d70f53c Mon Sep 17 00:00:00 2001
From: embdev <[EMAIL PROTECTED]>
Date: Wed, 3 Dec 2008 09:14:47 +0100
Subject: [PATCH] sb2-config -l add return value in case of error.
Signed-off-by: Michael Trimarchi <[EMAIL PROTECTED]>
---
utils/sb2-config | 10 ++++++++--
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()
--
1.5.6.5
_______________________________________________
Scratchbox-devel mailing list
[email protected]
http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-devel