mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-14 04:42:03 +08:00
!63 修复UOS未处理模拟软件源,新增ss-apt-fast ssupdate,杂项调整
修复UOS未处理模拟软件源
删除ssinstall的apt-fast安装功能(转移到ss-apt-fast,并且不会再对UOS安装apt-fast)
ss-apt-fast除了下载,安装和更新,全部走apt;
ss-apt-fast现在只会在安装/下载/更新时检测是否有apt-fast并处理
ss-apt-fast ssupdate 从服务器获取源链接后只更新星火源;
和 ss-apt-fast ssupdate 功能重复的内容转为调用
This commit is contained in:
@@ -1,33 +1,42 @@
|
||||
#/bin/bash
|
||||
|
||||
|
||||
DEPEND=`which apt-fast`
|
||||
if [ "$DEPEND" = "" ] ; then
|
||||
echo "未安装依赖:apt-fast 开始安装"
|
||||
sudo apt install apt-fast -y
|
||||
fi
|
||||
|
||||
|
||||
if [ "$1" = "install" ] || [ "$1" = "upgrade" ] || [ "$1" = "download" ] ; then
|
||||
|
||||
###刷新apt-fast配置
|
||||
mkdir -p /tmp/ss-apt-fast-conf/sources.list.d
|
||||
# 创建文件夹
|
||||
echo "从服务器获取配置和镜像列表..."
|
||||
echo "Getting server and mirror lists..."
|
||||
echo
|
||||
|
||||
curl --progress-bar -o /tmp/ss-apt-fast-conf/apt-fast.conf "https://gitee.com/deepin-community-store/repo_auto_update_script/raw/master/mirror-list-for-apt-fast/apt-fast.conf"
|
||||
|
||||
|
||||
chmod -R 755 /tmp/ss-apt-fast-conf
|
||||
|
||||
if [[ $1 == "policy" ]]; then
|
||||
bwrap --dev-bind / / \
|
||||
|
||||
DEPEND=`which apt-fast`
|
||||
if [ "$DEPEND" = "" ] ; then
|
||||
echo "未安装依赖:apt-fast 开始安装"
|
||||
sudo 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 update && sudo 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 apt-fast -y
|
||||
fi
|
||||
###执行安装
|
||||
bwrap --dev-bind / / \
|
||||
--bind '/tmp/ss-apt-fast-conf/apt-fast.conf' /etc/apt-fast.conf \
|
||||
--bind '/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list' /etc/apt/sources.list.d/sparkstore.list \
|
||||
apt "$@"
|
||||
else
|
||||
bwrap --dev-bind / / \
|
||||
--bind '/tmp/ss-apt-fast-conf/apt-fast.conf' /etc/apt-fast.conf \
|
||||
--bind '/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list' /etc/apt/sources.list.d/sparkstore.list \
|
||||
apt-fast "$@"
|
||||
fi
|
||||
|
||||
rm -rf /tmp/ss-apt-fast-conf
|
||||
|
||||
elif [ "$1" = "ssupdate" ];then
|
||||
sudo curl --progress-bar -o /opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list "https://gitee.com/deepin-community-store/repo_auto_update_script/raw/master/mirror-list-for-apt-fast/sources.list.d/sparkstore.list"
|
||||
sudo 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 update -o Dir::Etc::sourcelist="sources.list.d/sparkstore.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"
|
||||
#只更新星火源
|
||||
|
||||
else
|
||||
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 "$@"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user