mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-09-03 01:42:20 +08:00
修改: tool/update-upgrade/ss-update-notify-placer.sh
This commit is contained in:
parent
a932966795
commit
6d38c0bf70
@ -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"`
|
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
|
isupdate=`echo ${updatetext: -5}`
|
||||||
update_app_number=`echo ${updatetext%package*} #从右向左截取第一个 src 后的字符串`
|
if [ "$isupdate" = "date." ];then
|
||||||
update_app_number=`echo ${update_app_number: -1}`
|
sudo echo "0" > /tmp/spark-store-updatenum/number
|
||||||
mkdir -p /tmp/spark-store-updatenum
|
exit 0
|
||||||
sudo echo "$update_app_number" > /tmp/spark-store-updatenum/number
|
|
||||||
else
|
|
||||||
sudo echo "0" > /tmp/spark-store-updatenum/number
|
|
||||||
fi
|
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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user