From a09425f3616200505b1d44bd999d445d320591eb Mon Sep 17 00:00:00 2001 From: shenmo Date: Fri, 21 Oct 2022 13:46:23 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AC=A6=E5=8F=B7=E9=94=99=E8=AF=AF=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tool/update-upgrade/ss-do-upgrade.sh | 2 +- tool/update-upgrade/ss-update-notifier.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tool/update-upgrade/ss-do-upgrade.sh b/tool/update-upgrade/ss-do-upgrade.sh index 2cde528..28838e4 100755 --- a/tool/update-upgrade/ss-do-upgrade.sh +++ b/tool/update-upgrade/ss-do-upgrade.sh @@ -6,7 +6,7 @@ else PKG_UPGRADE_LIST=`for PKG_NAME in $PKG_LIST; do #### 检测是否是hold状态 - if [ "${dpkg-query -W -f='${Status}' $PKG_NAME | grep hold}" != "" ];then + if [ "$(dpkg-query -W -f='${Status}' $PKG_NAME | grep hold)" = "" ];then echo "true" echo "$PKG_NAME" else diff --git a/tool/update-upgrade/ss-update-notifier.sh b/tool/update-upgrade/ss-update-notifier.sh index e717ba7..2e92a89 100755 --- a/tool/update-upgrade/ss-update-notifier.sh +++ b/tool/update-upgrade/ss-update-notifier.sh @@ -74,7 +74,7 @@ update_app_number=`echo ${update_app_number##*information...}` PKG_LIST="$(bwrap --dev-bind / / --bind '/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list' /etc/apt/sources.list.d/sparkstore.list apt list --upgradable -o Dir::Etc::sourcelist="sources.list.d/sparkstore.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" | awk 'BEGIN {FS="/"} {print $1}' | awk NR\>1)" for PKG_NAME in $PKG_LIST;do -if [ "${dpkg-query -W -f='${Status}' $PKG_NAME | grep hold}" != "" ];then +if [ "$(dpkg-query -W -f='${Status}' $PKG_NAME | grep hold)" = "" ];then let update_app_number=update_app_number-1 fi done