diff --git a/CustomFiles/Depends/coremark.sh.sh b/CustomFiles/Depends/coremark.sh.sh new file mode 100644 index 0000000..3d5c196 --- /dev/null +++ b/CustomFiles/Depends/coremark.sh.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +coremark > /tmp/coremark.log +Scores=$(cat /tmp/coremark.log 2> /dev/null | grep "CoreMark 1.0" | awk '{print $4}') +Processer=$(awk -F ':[ ]' '/model name/{printf ($2);exit}' /proc/cpuinfo) + +[[ -n ${Processer} ]] && echo -e "\nProcesser: ${Processer}" +echo -e "Score: ${Scores}\nTime costs: $(grep "Total time" /tmp/coremark.log | awk '{print $4}')" +echo "(CPU Mark: ${Scores} Scores)" > /etc/bench.log + +if [ -f /etc/bench.log ]; then + sed -i '/coremark/d' /etc/crontabs/root + crontab /etc/crontabs/root +fi \ No newline at end of file diff --git a/CustomFiles/Depends/coremark_ImmortalWrt.sh b/CustomFiles/Depends/coremark_ImmortalWrt.sh deleted file mode 100755 index c631c1c..0000000 --- a/CustomFiles/Depends/coremark_ImmortalWrt.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -echo -e "\nRunning CoreMark test,please wait ..." - -Scores=$(cat /tmp/coremark.log 2> /dev/null | grep "CoreMark 1.0" | awk '{print $4}') -Processer=$(awk -F ':[ ]' '/model name/{printf ($2);exit}' /proc/cpuinfo) -Time=$(grep "Total time" /tmp/coremark.log | awk '{print $4}') -[[ -z "${Processer}" ]] && Processer=Unknown - -echo -e "\nProcesser: ${Processer}\nScore: ${Scores}\nTime costs: ${Time}" \ No newline at end of file diff --git a/CustomFiles/Depends/coremark_lede.sh b/CustomFiles/Depends/coremark_lede.sh deleted file mode 100755 index ab6f9b2..0000000 --- a/CustomFiles/Depends/coremark_lede.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -echo -e "\nRunning CoreMark test,please wait ..." -/bin/coremark > /tmp/coremark.log - -Scores=$(cat /tmp/coremark.log 2> /dev/null | grep "CoreMark 1.0" | awk '{print $4}') -Processer=$(awk -F ':[ ]' '/model name/{printf ($2);exit}' /proc/cpuinfo) -Time=$(grep "Total time" /tmp/coremark.log | awk '{print $4}') -[[ -z "${Processer}" ]] && Processer=Unknown - -echo -e "\nProcesser: ${Processer}\nScore: ${Scores}\nTime costs: ${Time}" -echo "(CPU Mark: ${Scores} Scores)" > /etc/bench.log - -if [ -f "/etc/bench.log" ]; then - sed -i '/coremark/d' /etc/crontabs/root - crontab /etc/crontabs/root -fi \ No newline at end of file diff --git a/Scripts/AutoBuild_Function.sh b/Scripts/AutoBuild_Function.sh index 69feaa4..dbd0697 100755 --- a/Scripts/AutoBuild_Function.sh +++ b/Scripts/AutoBuild_Function.sh @@ -209,7 +209,7 @@ Firmware-Diy_Base() { Replace_File CustomFiles/Depends/base-files-essential package/base-files/files/lib/upgrade/keep.d case "${Openwrt_Author}" in coolsnowwolf) - Replace_File CustomFiles/Depends/coremark_lede.sh package/lean/coremark coremark.sh + Replace_File CustomFiles/Depends/coremark.sh package/feeds/packages/coremark Replace_File CustomFiles/Depends/cpuinfo_x86 package/lean/autocore/files/x86/sbin cpuinfo AddPackage git other helloworld fw876 master sed -i 's/143/143,8080/' $(PKG_Finder d package luci-app-ssr-plus)/root/etc/init.d/shadowsocksr @@ -218,7 +218,6 @@ Firmware-Diy_Base() { # [[ ${INCLUDE_DRM_I915} == true ]] && Replace_File CustomFiles/Depends/i915-5.4 target/linux/x86 config-5.4 ;; immortalwrt) - Replace_File CustomFiles/Depends/coremark_ImmortalWrt.sh package/base-files/files/etc coremark.sh Replace_File CustomFiles/Depends/ImmortalWrt package/base-files/files/etc openwrt_release Replace_File CustomFiles/Depends/cpuinfo_x86 package/lean/autocore/files/x86/sbin cpuinfo sed -i "s?Template?Compiled by ${Author} [${Display_Date}]?g" ${Version_File}