31 lines
708 B
Bash
Executable File
31 lines
708 B
Bash
Executable File
sys=$1 #系统
|
|
sysarch=$(arch)
|
|
|
|
|
|
if [ "$sys" != "uos" ] && [ "$sys" != "kylin" ];then
|
|
|
|
echo "参数请设置根据系统设置,uos or kylin"
|
|
exit 1
|
|
fi
|
|
|
|
|
|
echo "------------------------------change cmake path:$1--------------------"
|
|
if [ "$sys" == "uos" ];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 -j6
|
|
|
|
if [ $? -ne 0 ];then
|
|
echo "--------------------------------------make fail---------------------------------------"
|
|
exit 1
|
|
fi
|
|
echo "--------------------------------------make succeed------------------------------------"
|
|
|
|
make
|