#!/bin/bash
###
### set.sh - does one thing well
###
### Usage:
### ./set.sh -a
###
### Options:
### <a> enable asan support
### <p> product type, 1:for hisense 2:jv 800W
### <w> 4G support
### -h Show this message.
help() {
awk -F'### ' '/^###/ { print $2 }' "$0"
}
if [[ "$1" == "-h" ]]; then
help
exit 1
fi
echo $COMPILE_
string1=`pwd`
echo $string1
if [[ $string1 =~ "build-rv1126" ]]; then
echo "--------------dir ok $COMPILE_PATH"
rm -rf `ls|grep -v "set.*.sh"`
else
echo "--------------dir error!"
exit 0
fi
while getopts ":a:p:w" opt
do
case $opt in
a)
ASAN_SUPPORT=ON
;;
p)
PRODUCT_TYPE=$OPTARG
;;
w)
WIRELESS_4G_SUPPORT=ON
;;
?)
echo -e "\033[0;31mUnknown option $OPTARG\033[0m"
exit
;;
esac
done
\033[显示方式;前景色;背景色m输出字符串\033[0m或\e[显示方式;前景色;背景色m输出字符串\033[0m其中 ,'\033[0m'用于恢复默认的终端输出属性,否则会影响后续的输出。