* feat: aptss不再尝试安装apt-fast,转而自带

* chore:  删除password-check模块
This commit is contained in:
2022-12-04 15:07:44 +08:00
parent c90232022e
commit 28ed452bb0
5 changed files with 663 additions and 65 deletions

View File

@@ -1,6 +1,10 @@
#!/bin/bash
#将来可能可以换成apt-metalink来直接用种子/链接下载
apt-fast(){
/opt/durapps/spark-store/bin/apt-fast/ss-apt-fast "$@"
}
echo "Spark Store Install script.星火商店安装脚本"
#################检测文件是否存在
@@ -35,50 +39,18 @@ fi
##################apt-fast/metalink测试
DEPEND="这里一定会安装所以放弃处理"
##############判断是否是root运行如果是则正常走如果不是则代输密码
if [ "$(id -u)" != "0" ];then
#############################无root权限时
IS_INSTALLED=`which apt-fast`
if [ "$IS_INSTALLED" = "" ] ; then
echo "未安装依赖ss-apt-fast 开始安装"
echo "$upass" | sudo -S aptss ssupdate && echo "$upass" | sudo -S 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 install ss-apt-fast -y
fi
if [ "$DEPEND" != "" ]; then
echo "检测到apt-fast使用aptss进行多线程下载加速"
echo ----------------------------------------------------------------------------------
----------------------------------------------------------------------------------
echo "$upass" | sudo -S dpkg -i $1 || sudo aptss install -yf
fi
else
###########################有root权限时
IS_INSTALLED=`which apt-fast`
if [ "$IS_INSTALLED" = "" ] ; then
echo "未安装依赖ss-apt-fast 开始安装"
aptss ssupdate && 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 install ss-apt-fast -y
fi
if [ "$DEPEND" != "" ]; then
echo "检测到apt-fast使用aptss进行多线程下载加速"
echo ----------------------------------------------------------------------------------
echo ----------------------------------------------------------------------------------
dpkg -i $1 || aptss install -yf
fi