From 70ef1f8716d2a0f6bee3f3f4e3571621168357da Mon Sep 17 00:00:00 2001 From: Hyy2001X <1804430051@qq.com> Date: Tue, 10 Aug 2021 00:52:03 +0800 Subject: [PATCH] =?UTF-8?q?profile:=20=E5=B1=8F=E8=94=BD=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CustomFiles/Depends/profile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CustomFiles/Depends/profile b/CustomFiles/Depends/profile index 8dc88ce..80c3e23 100644 --- a/CustomFiles/Depends/profile +++ b/CustomFiles/Depends/profile @@ -1,11 +1,10 @@ Sysinfo() { - source /rom/etc/AutoBuild/Default_Variable > /dev/null 2>&1 + source /rom/etc/AutoBuild/Default_Variable 2>/dev/null [ -z "${CURRENT_Version}" ] && CURRENT_Version=未知 [ -z "${TARGET_PROFILE}" ] && local TARGET_PROFILE=$(jsonfilter -e '@.model.id' < /etc/board.json | tr ',' '_') local CoreMark=$([ -f /etc/bench.log ] && egrep -o "[0-9]+" /etc/bench.log | awk 'NR==1') local Startup=$(awk '{a=$1/86400;b=($1%86400)/3600;c=($1%3600)/60;d=($1%60)} {printf("%d 天 %d 小时 %d 分钟 %d 秒\n",a,b,c,d)}' /proc/uptime) - local TEMP=$(echo "$(sensors 2>/dev/null | grep Core | awk '{Sum += $3};END {print Sum}') / $(sensors 2>/dev/null | grep Core | wc -l)" | bc | awk '{a=$1;b=32+$1*1.8} {printf("%d°C \e[36m|\e[0m %.1f°F\n",a,b)}') - echo + local TEMP=$(echo "$(sensors 2> /dev/null | grep Core | awk '{Sum += $3};END {print Sum}') / $(sensors 2>/dev/null | grep Core | wc -l)" | bc 2>/dev/null | awk '{a=$1;b=32+$1*1.8} {printf("%d°C \e[36m|\e[0m %.1f°F\n",a,b)}') echo -e " 设备信息: ${Yellow}${TARGET_PROFILE} ${Div} $(uname -n)" echo -e " 内核版本: K$(uname -rs | egrep -o "[0-9].+")" echo -e " 可用内存: $(free | grep Mem | awk '{a=$7*100/$2};b=$7/1024 {printf("%.1fM \e[36m|\e[0m %.1f\n",b,a)}')%"