Revert "安装优化"

This reverts commit ecbfb2500f.
This commit is contained in:
midoks
2022-10-25 03:34:00 +08:00
parent ecbfb2500f
commit cff29194f4
13 changed files with 103 additions and 98 deletions
+8 -8
View File
@@ -70,14 +70,14 @@ if [ -f /proc/cpuinfo ];then
cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l`
fi
# MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}')
# if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then
# if [ "${cpuCore}" -gt "${MEM_INFO}" ];then
# cpuCore="${MEM_INFO}"
# fi
# else
# cpuCore="1"
# fi
MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}')
if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then
if [ "${cpuCore}" -gt "${MEM_INFO}" ];then
cpuCore="${MEM_INFO}"
fi
else
cpuCore="1"
fi
if [ "$cpuCore" -gt "1" ];then
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`