Update blogs_remote

This commit is contained in:
喵二
2024-07-15 22:55:44 +08:00
committed by GitHub
parent 56b5471ff7
commit d540a42013

View File

@@ -489,6 +489,7 @@ catwrt_update() {
version_remote=$(curl -s "$API_URL" | jq -r ".$arch_self.version") version_remote=$(curl -s "$API_URL" | jq -r ".$arch_self.version")
hash_remote=$(curl -s "$API_URL" | jq -r ".$arch_self.hash") hash_remote=$(curl -s "$API_URL" | jq -r ".$arch_self.hash")
channel_remote=$(curl -s "$API_URL" | jq -r ".$arch_self.channel") channel_remote=$(curl -s "$API_URL" | jq -r ".$arch_self.channel")
blogs_remote=$(echo "$API_URL" | jq -r ".${arch}.blogs")
if [ $? -ne 0 ] || [ -z "$version_remote" ] || [ -z "$hash_remote" ]; then if [ $? -ne 0 ] || [ -z "$version_remote" ] || [ -z "$hash_remote" ]; then
remote_error "version or hash" remote_error "version or hash"
@@ -509,13 +510,12 @@ catwrt_update() {
contrast_version() { contrast_version() {
if [ "$version_remote" == "$version_local" ] && [ "$hash_remote" == "$hash_local" ]; then if [ "$version_remote" == "$version_local" ] && [ "$hash_remote" == "$hash_local" ]; then
echo "=======================================================" echo "======================================================="
echo "Your CatWrt is up to date! Also, you are using $channel_remote channel." echo "Your CatWrt is latest version! Also, you are using $channel_remote channel."
echo "=======================================================" echo "======================================================="
else else
echo "=======================================================" echo "======================================================="
echo "Your CatWrt is out of date, you should upgrade it!" echo "Your CatWrt is outdated; you should upgrade it to the latest version!"
echo "Visit the blog for more information" echo "Visit '$blogs_remote' for more information."
echo "https://www.miaoer.xyz/posts/network/catwrt"
echo "=======================================================" echo "======================================================="
fi fi
} }