#!/bin/bash # 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 if [ -f $dir/build*.sh ] ; then cd $dir ./build*.sh cd - fi done } 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