From 6d38c0bf70c99d3893979cb3b75085aca57ce65c Mon Sep 17 00:00:00 2001 From: shenmo Date: Mon, 11 Apr 2022 01:49:05 +0800 Subject: [PATCH] =?UTF-8?q?=09=E4=BF=AE=E6=94=B9=EF=BC=9A=20=20=20=20=20to?= =?UTF-8?q?ol/update-upgrade/ss-update-notify-placer.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../update-upgrade/ss-update-notify-placer.sh | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/tool/update-upgrade/ss-update-notify-placer.sh b/tool/update-upgrade/ss-update-notify-placer.sh index da3e1eb..19c56c3 100755 --- a/tool/update-upgrade/ss-update-notify-placer.sh +++ b/tool/update-upgrade/ss-update-notify-placer.sh @@ -38,14 +38,17 @@ fi updatetext=`sudo apt update -o Dir::Etc::sourcelist="sources.list.d/sparkstore.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"` -isupdate=`echo $updatetext | grep "can be upgraded"` -#echo $isupdate -if [ "$isupdate" ];then - update_app_number=`echo ${updatetext%package*} #从右向左截取第一个 src 后的字符串` - update_app_number=`echo ${update_app_number: -1}` - mkdir -p /tmp/spark-store-updatenum - sudo echo "$update_app_number" > /tmp/spark-store-updatenum/number -else - sudo echo "0" > /tmp/spark-store-updatenum/number +isupdate=`echo ${updatetext: -5}` +if [ "$isupdate" = "date." ];then +sudo echo "0" > /tmp/spark-store-updatenum/number +exit 0 fi + + +update_app_number=`echo ${updatetext%package*} #从右向左截取第一个 src 后的字符串` +update_app_number=`echo ${update_app_number: -1}` +sudo echo "$update_app_number" > /tmp/spark-store-updatenum/number + + +