From fb42d6e56549768b3c27698227b284df544390e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=96=B5=E4=BA=8C?= <66155308+miaoermua@users.noreply.github.com> Date: Wed, 14 Aug 2024 16:03:23 +0800 Subject: [PATCH] Update cattools.sh --- cattools.sh | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/cattools.sh b/cattools.sh index 2ed3e3c..e280fe3 100644 --- a/cattools.sh +++ b/cattools.sh @@ -1663,12 +1663,17 @@ reset_root_password() { patch_catwrt_release() { if [ -f $RELEASE ]; then - if grep -q "version=v23.7" $RELEASE && grep -q "arch=amd64" $RELEASE && grep -q "source=lean" $RELEASE; then - echo "Already patched for x86_64 v23.7" - elif grep -q "version=v23.8" $RELEASE && grep -q "arch=amd64" $RELEASE && grep -q "source=lean" $RELEASE; then - echo "Already patched for x86_64 v23.8" - elif grep -q "version=v23.8" $RELEASE && grep -q "arch=mt798x" $RELEASE && grep -q "source=lean" $RELEASE; then - echo "Already patched for aarch64 v23.8" + if ! grep -q "source=lean" $RELEASE; then + if grep -q "version=v23.7" $RELEASE && grep -q "arch=amd64" $RELEASE; then + echo "source=lean" >>$RELEASE + echo "Update release files x86_64 v23.7" + elif grep -q "version=v23.8" $RELEASE && grep -q "arch=amd64" $RELEASE; then + echo "source=lean" >>$RELEASE + echo "Update release files x86_64 v23.8" + elif grep -q "version=v23.8" $RELEASE && grep -q "arch=mt798x" $RELEASE; then + echo "source=lean" >>$RELEASE + echo "Update release files aarch64 v23.8" + fi fi else if [ "$(uname -m)" == "mips" ] || [ "$(uname -m)" == "mipsel" ] && grep -q "R22.12.1" /etc/openwrt_release && grep -q "miaoer.xyz" /etc/banner; then