sysarch=$(arch) sys=$(cat /etc/issue) sys=${sys%% *} echo "------------------------------change cmake path:$1--------------------" if [ "$sys" == "UnionTech" ];then sed -i "s/kylin/$1/g" hgdriver/wrapper/CMakeLists.txt elif [ "$sys" == "kylin" ];then sed -i "s/uos/$1/g" hgdriver/wrapper/CMakeLists.txt fi mkdir build cd build cmake .. make if [ $? -ne 0 ];then echo "--------------------------------------make fail---------------------------------------" exit 1 fi echo "--------------------------------------make succeed------------------------------------" make