This commit is contained in:
Mr Chen
2018-11-26 15:54:42 +08:00
parent f46af799a9
commit a74ace856a
8 changed files with 791 additions and 798 deletions
+6 -4
View File
@@ -5,17 +5,20 @@ export PATH
curPath=`pwd`
rootPath=$(dirname "$curPath")
rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath")
install_tmp=${rootPath}/tmp/bt_install.pl
Install_score()
{
echo '正在安装脚本文件...' > $install_tmp
mkdir -p $serverPath/score
gcc $curPath/testcpu.c -o $curPath/testcpu -lpthread
if [ ! -f $curPath/testcpu ];then
gcc $curPath/testcpu.c -o $serverPath/score/testcpu -lpthread
if [ ! -f $serverPath/score/testcpu ];then
sleep 0.1
gcc $curPath/testcpu.c -o $curPath/testcpu -lpthread
gcc $curPath/testcpu.c -o $serverPath/score/testcpu -lpthread
fi
echo '安装完成' > $install_tmp
@@ -26,7 +29,6 @@ Uninstall_score()
echo '卸载完成' > $install_tmp
}
action=$1
if [ "${1}" == 'install' ];then
Install_score