From e8d34d11799fc79c7c53bdcd40f9b4ee7be7a2c5 Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Wed, 25 Sep 2024 17:42:22 +0800
Subject: [PATCH] Merge branch 'master' of ssh://weike-iot.com:2280/framwork

---
 openlibs/build.sh |   45 +++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 43 insertions(+), 2 deletions(-)

diff --git a/openlibs/build.sh b/openlibs/build.sh
index cbc3f36..34c8de6 100755
--- a/openlibs/build.sh
+++ b/openlibs/build.sh
@@ -1,6 +1,27 @@
 #!/bin/bash
 
-function do_compile
+# this project absolute path
+PRJ_PATH=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)
+
+cd $PRJ_PATH
+
+#+-------------------------+
+#| Shell script functions  |
+#+-------------------------+
+
+function pr_error() {
+    echo -e "\033[40;31m $1 \033[0m"
+}
+
+function pr_warn() {
+    echo -e "\033[40;33m $1 \033[0m"
+}
+
+function pr_info() {
+    echo -e "\033[40;32m $1 \033[0m"
+}
+
+function do_build
 {
     for dir in `ls`
     do
@@ -12,5 +33,25 @@
     done
 }
 
-do_compile
+function do_clean()
+{
+    for dir in `ls`
+    do
+        if [ -f $dir/build*.sh ] ; then
+            cd $dir
+               ./build*.sh -c
+            cd -
+        fi
+    done
+
+    rm -rf install
+}
+
+if [[ $# == 1 && $1 == -c ]] ;then
+    pr_warn "start clean ${LIB_NAME}"
+    do_clean
+    exit;
+fi
+
+do_build
 

--
Gitblit v1.9.1