#!/bin/sh

productPara=$1
productNumber=(tablet)
warringError="Please enter the correct parameters.( tablet )"
isExist=
#获取脚本所在的目录
workdir=$(cd $(dirname $0); pwd)
# echo $workdir

#参数为空,错误提醒
if [ ! -n "$productPara" ] ;then
	echo $warringError
	exit;
fi

#遍历参数是否存在productNumber中(参数合法性判断)
for i in ${productNumber[@]}
do
	if [ $i == $productPara ]
	then
		isExist="yes"
		break
	fi
done

if [  ! -n "$isExist" ]
then
	echo $warringError
	exit;
fi



#对intel单独的定制进行配置
if [ $productPara = ${productNumber[0]} ]
then
	echo ""
	#将CMakeLists.txt文件拷贝到fcitx目录下，增加宏定义INTEL_PRODUCT_DEBUG
	cp -rvf $workdir/$productPara/CMakeLists.txt $workdir/../.

	echo ""
fi

echo "finish..."



