u
This commit is contained in:
@@ -26,11 +26,11 @@ arch=`uname -m`
|
||||
mount -t tmpfs -o remount,size=850m tmpfs /tmp
|
||||
rm -rf /tmp/upg && mkdir /tmp/upg && cd /tmp/upg
|
||||
|
||||
latest_release_tag=`get_latest_release klever1988/nanopi-openwrt`
|
||||
latest_release_tag=`get_latest_release stupidloud/nanopi-openwrt`
|
||||
echo -e '\e[92m准备更新到'$latest_release_tag'\e[0m'
|
||||
md5sum=`wget https://ghproxy.com/https://github.com/klever1988/nanopi-openwrt/releases/download/$latest_release_tag/$board_id$ver.img.gz -O- | tee >(gzip -dc>$board_id.img) | md5sum | awk '{print $1}'`
|
||||
md5sum=`wget https://ghproxy.com/https://github.com/stupidloud/nanopi-openwrt/releases/download/$latest_release_tag/$board_id$ver.img.gz -O- | tee >(gzip -dc>$board_id.img) | md5sum | awk '{print $1}'`
|
||||
if [ "$md5sum" != "d41d8cd98f00b204e9800998ecf8427e" ]; then
|
||||
wget https://ghproxy.com/https://github.com/klever1988/nanopi-openwrt/releases/download/$latest_release_tag/$board_id$ver.img.gz.md5 -O md5sum.txt
|
||||
wget https://ghproxy.com/https://github.com/stupidloud/nanopi-openwrt/releases/download/$latest_release_tag/$board_id$ver.img.gz.md5 -O md5sum.txt
|
||||
echo -e '\e[92m'$latest_release_tag'固件已下载\e[0m'
|
||||
fi
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@ proceed_command sfdisk
|
||||
proceed_command losetup
|
||||
proceed_command resize2fs
|
||||
opkg install coreutils-truncate || true
|
||||
wget -NP /tmp https://ghproxy.com/https://raw.githubusercontent.com/klever1988/nanopi-openwrt/zstd-bin/truncate
|
||||
wget -NP /tmp https://ghproxy.com/https://raw.githubusercontent.com/klever1988/nanopi-openwrt/zstd-bin/ddnz
|
||||
wget -NP /tmp https://ghproxy.com/https://raw.githubusercontent.com/stupidloud/nanopi-openwrt/zstd-bin/truncate
|
||||
wget -NP /tmp https://ghproxy.com/https://raw.githubusercontent.com/stupidloud/nanopi-openwrt/zstd-bin/ddnz
|
||||
chmod +x /tmp/truncate /tmp/ddnz
|
||||
|
||||
board_id=$(cat /etc/board.json | jsonfilter -e '@["model"].id' | sed 's/friendly.*,nanopi-//;s/xunlong,orangepi-//;s/^r1s-h5$/r1s/;s/^r1$/r1s-h3/;s/^r1-plus$/r1p/;s/^r1-plus-lts$/r1p-lts/;s/default-string-default-string/x86/;s/vmware-inc-vmware7-1/x86/')
|
||||
@@ -22,15 +22,15 @@ arch=`uname -m`
|
||||
mount -t tmpfs -o remount,size=850m tmpfs /tmp
|
||||
rm -rf /tmp/upg && mkdir /tmp/upg && cd /tmp/upg
|
||||
set +e
|
||||
wget https://ghproxy.com/https://github.com/klever1988/nanopi-openwrt/releases/download/$(date +%Y-%m-%d)/$board_id$ver.img.gz -O- | gzip -dc > $board_id.img
|
||||
wget https://ghproxy.com/https://github.com/stupidloud/nanopi-openwrt/releases/download/$(date +%Y-%m-%d)/$board_id$ver.img.gz -O- | gzip -dc > $board_id.img
|
||||
if [ $? -eq 0 ]; then
|
||||
wget https://ghproxy.com/https://github.com/klever1988/nanopi-openwrt/releases/download/$(date +%Y-%m-%d)/$board_id$ver.img.md5 -O md5sum.txt
|
||||
wget https://ghproxy.com/https://github.com/stupidloud/nanopi-openwrt/releases/download/$(date +%Y-%m-%d)/$board_id$ver.img.md5 -O md5sum.txt
|
||||
echo -e '\e[92m今天固件已下载,准备解压\e[0m'
|
||||
else
|
||||
echo -e '\e[91m今天的固件还没更新,尝试下载昨天的固件\e[0m'
|
||||
wget https://ghproxy.com/https://github.com/klever1988/nanopi-openwrt/releases/download/$(date -d "@$(( $(busybox date +%s) - 86400))" +%Y-%m-%d)/$board_id$ver.img.gz -O- | gzip -dc > $board_id.img
|
||||
wget https://ghproxy.com/https://github.com/stupidloud/nanopi-openwrt/releases/download/$(date -d "@$(( $(busybox date +%s) - 86400))" +%Y-%m-%d)/$board_id$ver.img.gz -O- | gzip -dc > $board_id.img
|
||||
if [ $? -eq 0 ]; then
|
||||
wget https://ghproxy.com/https://github.com/klever1988/nanopi-openwrt/releases/download/$(date -d "@$(( $(busybox date +%s) - 86400))" +%Y-%m-%d)/$board_id$ver.img.md5 -O md5sum.txt
|
||||
wget https://ghproxy.com/https://github.com/stupidloud/nanopi-openwrt/releases/download/$(date -d "@$(( $(busybox date +%s) - 86400))" +%Y-%m-%d)/$board_id$ver.img.md5 -O md5sum.txt
|
||||
echo -e '\e[92m昨天的固件已下载,准备解压\e[0m'
|
||||
else
|
||||
echo -e '\e[91m没找到最新的固件,脚本退出\e[0m'
|
||||
|
||||
@@ -30,8 +30,8 @@ rm -rf package/custom; mkdir package/custom
|
||||
merge_feed nas "https://github.com/linkease/nas-packages;master"
|
||||
merge_feed nas_luci "https://github.com/linkease/nas-packages-luci;main"
|
||||
rm -r package/feeds/nas_luci/luci-app-ddnsto
|
||||
merge_feed helloworld "https://github.com/klever1988/helloworld;tmp"
|
||||
#merge_package https://github.com/klever1988/openwrt-mos/trunk/luci-app-mosdns
|
||||
merge_feed helloworld "https://github.com/stupidloud/helloworld;tmp"
|
||||
#merge_package https://github.com/stupidloud/openwrt-mos/trunk/luci-app-mosdns
|
||||
merge_package https://github.com/project-lede/luci-app-godproxy
|
||||
merge_package https://github.com/sundaqiang/openwrt-packages/trunk/luci-app-wolplus
|
||||
merge_package https://github.com/kuoruan/openwrt-frp frp
|
||||
|
||||
@@ -80,11 +80,11 @@ case $status_page in
|
||||
*htm)
|
||||
line_number_FV=`grep -n 'Firmware Version' $status_page | cut -d: -f 1`
|
||||
sed -i '/ver\./d' $status_page
|
||||
sed -i $line_number_FV' a <a href="https://github.com/klever1988/nanopi-openwrt" target="_blank">klever1988/nanopi-openwrt</a> '$strDate $status_page
|
||||
sed -i $line_number_FV' a <a href="https://github.com/stupidloud/nanopi-openwrt" target="_blank">stupidloud/nanopi-openwrt</a> '$strDate $status_page
|
||||
;;
|
||||
*js)
|
||||
line_number_FV=`grep -m1 -n 'var fields' $status_page | cut -d: -f1`
|
||||
sed -i $line_number_FV' i var pfv = document.createElement('\''placeholder'\'');pfv.innerHTML = '\''<a href="https://github.com/klever1988/nanopi-openwrt" target="_blank">klever1988/nanopi-openwrt</a> '$strDate"';" $status_page
|
||||
sed -i $line_number_FV' i var pfv = document.createElement('\''placeholder'\'');pfv.innerHTML = '\''<a href="https://github.com/stupidloud/nanopi-openwrt" target="_blank">stupidloud/nanopi-openwrt</a> '$strDate"';" $status_page
|
||||
line_number_FV=`grep -n 'Firmware Version' $status_page | cut -d : -f 1`
|
||||
sed -i '/Firmware Version/d' $status_page
|
||||
sed -i $line_number_FV' a _('\''Firmware Version'\''), pfv,' $status_page
|
||||
|
||||
Reference in New Issue
Block a user