LingYun Studio embeded system framwork software, such as thirdparty build shell and lingyun library
guowenxue
2024-09-25 e8d34d11799fc79c7c53bdcd40f9b4ee7be7a2c5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
 
# 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
        if [ -f $dir/build*.sh ] ; then
            cd $dir
               ./build*.sh
            cd -
        fi
    done
}
 
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