基本操作
- debug:生成debug包
- release:生成release包
- all:依次生成debug包,release包
示例一
#!/bin/sh
export STAGING_DIR=../staging_dir
export PATH=$PATH:../staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin/
PACK_CMD="./tools/OemFilePatch/pack.sh"
usage()
{
echo "Usage:"
echo " $0 debug"
echo " $0 release"
echo " $0 all"
exit 1
}
debug_process()
{
echo "\033[31m debug Building \033[0m"
make clean
make STAGING_DIR=../staging_dir UART_DEBUG=y
cp -f out/demo tools/OemFilePatch/oemfile/
$PACK_CMD "debug"
}
release_process()
{
echo "\033[32m release Building \033[0m"
make clean
make STAGING_DIR=../staging_dir
cp -f out/demo tools/OemFilePatch/oemfile/
$PACK_CMD "release"
}
if [ 1 -ne $# ];then
usage
elif [ $1 = "debug" ]; then
debug_process
elif [ $1 = "release" ]; then
release_process
elif [ $1 = "all" ]; then
debug_process
release_process
else
usage
fi
cp -f out/demo /nfsroot