From ba226d945dd784aa21c70584c464a11e890d2b90 Mon Sep 17 00:00:00 2001 From: guowenxue <guowenxue@gmail.com> Date: Tue, 29 Oct 2024 10:11:59 +0800 Subject: [PATCH] Add evtest build shell script --- 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