diff --git a/tool/update-upgrade/ss-update-notifier.sh b/tool/update-upgrade/ss-update-notifier.sh index d96979b..0d203b0 100755 --- a/tool/update-upgrade/ss-update-notifier.sh +++ b/tool/update-upgrade/ss-update-notifier.sh @@ -66,15 +66,12 @@ updatetext=`LANGUAGE=en_US aptss ssupdate 2>&1` done -isupdate=`echo ${updatetext: -5}` -if [ "$isupdate" = "date." ] ; then +update_app_number=$(env LANGUAGE=en_US /usr/bin/apt -c /opt/durapps/spark-store/bin/apt-fast-conf/aptss-apt.conf list --upgradable -o Dir::Etc::sourcelist="/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list" -o Dir::Etc::sourceparts="/dev/null" -o APT::Get::List-Cleanup="0" 2>/dev/null | grep -c upgradable) + +if [ "$update_app_number" -le 0 ] ; then exit 0 fi -## 从这里开始,只有检测到了更新才会进行 -update_app_number=`echo ${updatetext%package*} #从右向左截取第一个 src 后的字符串` -update_app_number=`echo ${update_app_number##*information...}` - # 获取用户选择的要更新的应用 PKG_LIST="$(/opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh upgradable-list)" # 指定分隔符为 \n