在编译工程中有时候需要对不同版本进行不同的配置
手动起来很麻烦而且比较容易出错
写一个shell用于执行不同的内容相对来说较为方便
#!/bin/sh
# author:cm
input=$1
copy_and_compiler(){
echo "compiler OK"
}
DemoFun(){
echo "compiler test mode"
echo "copy config OK"
copy_and_compiler
}
FormalFun(){
echo "compiler formal mode"
echo "copy config OK"
copy_and_compiler
}
if [ "$input" = "test" ]
then
DemoFun
fi
if [ "$input" = "formal" ]
then
FormalFun
fi