aboutsummaryrefslogtreecommitdiff
path: root/trunk/src/mkbuild
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/src/mkbuild')
-rwxr-xr-xtrunk/src/mkbuild45
1 files changed, 45 insertions, 0 deletions
diff --git a/trunk/src/mkbuild b/trunk/src/mkbuild
index 3a3a9be..63ab779 100755
--- a/trunk/src/mkbuild
+++ b/trunk/src/mkbuild
@@ -1356,6 +1356,11 @@ function search_mkbuild {
# find a given mkbuild
# usage: search_mkbuild [-i]
+ if [ "$MKBUILD_NAME" == ".mkbuild" ]; then
+ list_mkbuilds
+ return
+ fi
+
if [ "$1" == "-i" ]; then
# case insensitive mode
find $MKBUILDS_DIR -iname $MKBUILD_NAME
@@ -1365,6 +1370,46 @@ function search_mkbuild {
}
+function list_mkbuilds {
+
+ # List all available mkbuilds
+ cd $MKBUILDS_DIR
+ echo "Sarava mkbuilds list"
+ # level 1
+ for i in *; do
+ if [ -d $i ]; then
+ echo -e " $i: "
+ (
+ cd $i
+ # level 2
+ for j in *; do
+ if [ -d $j ]; then
+ eecho $commun " $j"
+ (
+ cd $j
+ BUILD="`ls *.mkbuild 2>/dev/null`"
+ if [ "$BUILD" != "" ]; then
+ # level 3
+ for k in $BUILD; do
+ eecho $messag " $k"
+ done
+ else
+ BUILD=""
+ fi
+ for k in *; do
+ if [ -d $k ]; then
+ eecho $messag " $k.mkbuild"
+ fi
+ done
+ )
+ fi
+ done
+ )
+ fi
+ done
+
+}
+
function edit_mkbuild {
# edit a mkbuild