LingYun Studio embeded system framwork software, such as thirdparty build shell and lingyun library
guowenxue
2024-08-23 cafc37823fac451035e065fa469338fab3a5641a
openlibs/build.sh
@@ -1,6 +1,25 @@
#!/bin/bash
function do_compile
# this project absolute path
PRJ_PATH=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)
#+-------------------------+
#| 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 +31,25 @@
    done
}
do_compile
function do_clean()
{
    rm -rf install
    for dir in `ls`
    do
        if [ -f $dir/build*.sh ] ; then
            cd $dir
               ./build*.sh -c
            cd -
        fi
    done
}
if [[ $# == 1 && $1 == -c ]] ;then
    pr_warn "start clean ${LIB_NAME}"
    do_clean
    exit;
fi
do_build