From 2ddfb3f192be61c4ab5c95ccc9c9cebf5abe378c Mon Sep 17 00:00:00 2001 From: shenmo Date: Sun, 24 Apr 2022 07:33:47 +0000 Subject: [PATCH] =?UTF-8?q?!31=20=E5=85=BC=E5=AE=B9=E6=94=B9=E5=8A=A8?= =?UTF-8?q?=E6=94=B9=E5=8F=98=E6=96=87=E6=A1=88+ssinstall=E4=B8=B4?= =?UTF-8?q?=E6=97=B6=E6=8F=90=E5=8D=87=E4=BC=98=E5=85=88=E7=BA=A7=20*=20up?= =?UTF-8?q?date=20tool/ssinstall.=20*=20update=20tool/ssinstall.=20*=20upd?= =?UTF-8?q?ate=20tool/ssinstall.=20*=20update=20tool/ssinstall.=20*=20upda?= =?UTF-8?q?te=20tool/ssinstall.=20*=20update=20tool/ssinstall.=20*=20updat?= =?UTF-8?q?e=20translations/spark-store=5Fzh=5FCN.ts.=20*=20update=20src/w?= =?UTF-8?q?idget.ui.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget.ui | 4 ++-- tool/ssinstall | 32 ++++++++++++++++++++++++++++++- translations/spark-store_zh_CN.ts | 4 ++-- 3 files changed, 35 insertions(+), 5 deletions(-) diff --git a/src/widget.ui b/src/widget.ui index bd8ef58..a31e9c5 100644 --- a/src/widget.ui +++ b/src/widget.ui @@ -766,10 +766,10 @@ - <html><head/><body><p>Capable to Ubuntu 20.04</p></body></html> + <html><head/><body><p>Capable to Ubuntu 22.04</p></body></html> - <html><head/><body><p>Capable to Ubuntu 20.04</p></body></html> + <html><head/><body><p>Capable to Ubuntu 22.04</p></body></html> <html><head/><body><p><img src=":/tags/ubuntu-small.png"/></p></body></html> diff --git a/tool/ssinstall b/tool/ssinstall index 0905db8..68a1038 100755 --- a/tool/ssinstall +++ b/tool/ssinstall @@ -1,3 +1,33 @@ -#!/bin/sh +#!/bin/bash +#将来可能可以换成apt-metalink来直接用种子/链接下载 +echo "Spark Store Install script.星火商店安装脚本" + +DEPEND=`dpkg -s apt-fast` +isuos=`cat /etc/os-release | grep UnionTech` +#临时提升星火源的优先级 +sed -i 's/400/500/g' /etc/apt/preferences.d/sparkstore + +if [ "$DEPEND" = "" ] ; then +echo "没有检测到apt-fast组件,将会使用单线程下载依赖" +echo "你可以安装apt-fast来加速下载(对UOS无效)" +echo "若要使用apt-fast加速下载,请在安装apt-fast时选择使用apt并选择略过确认对话框" +echo ---------------------------------------------------------------------------------- dpkg -i $1 || apt install -yf || dpkg -P $1 +fi + + +if [ "$DEPEND" != "" ] && [ "$isuos" != "" ]; then +echo "UOS中系统依赖无法使用第三方下载工具,放弃使用apt-fast" +echo ---------------------------------------------------------------------------------- +dpkg -i $1 || apt install -yf || dpkg -P $1 +fi + +if [ "$DEPEND" != "" ] && [ "$isuos" = "" ]; then +echo "检测到apt-fast,使用apt-fast进行多线程下载加速" +echo ---------------------------------------------------------------------------------- +dpkg -i $1 || apt-fast install -yf || dpkg -P $1 +fi + +sed -i 's/500/400/g' /etc/apt/preferences.d/sparkstore +#恢复优先级 \ No newline at end of file diff --git a/translations/spark-store_zh_CN.ts b/translations/spark-store_zh_CN.ts index 012d308..b8bedda 100644 --- a/translations/spark-store_zh_CN.ts +++ b/translations/spark-store_zh_CN.ts @@ -239,8 +239,8 @@ - <html><head/><body><p>Capable to Ubuntu 20.04</p></body></html> - <html><head/><body><p>支持Ubuntu 20.04</p></body></html> + <html><head/><body><p>Capable to Ubuntu 22.04</p></body></html> + <html><head/><body><p>支持Ubuntu 22.04</p></body></html>