mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-13 20:32:05 +08:00
!59 * 调整 现在与系统更新分开,不再导致更新失败 * 支持直接更新软件源文件,不再让d.吃全部更新流量 * ss-apt-fast不再强制root权限
* !61 $1为policy时,apt-fast换成apt * 手动更新时也重新获取源文件 * 修改: tool/ss-apt-fast * * 调整 现在与系统更新分开,不再导致更新失败
This commit is contained in:
@@ -1,19 +1,33 @@
|
||||
#/bin/bash
|
||||
|
||||
if [ "$(id -u)" != "0" ]
|
||||
then
|
||||
echo "ss-apt-fast需要在root下运行"
|
||||
exit
|
||||
fi
|
||||
|
||||
DEPEND=`which apt-fast`
|
||||
if [ "$DEPEND" = "" ] ; then
|
||||
echo "未安装依赖:apt-fast 开始安装"
|
||||
apt install apt-fast -y
|
||||
sudo apt install apt-fast -y
|
||||
fi
|
||||
|
||||
rm /opt/durapps/spark-store/bin/apt-fast-conf/apt-fast.conf
|
||||
mkdir -p /tmp/ss-apt-fast-conf/sources.list.d
|
||||
# 创建文件夹
|
||||
echo "从服务器获取配置和镜像列表..."
|
||||
curl -s --progress-bar -o /opt/durapps/spark-store/bin/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"
|
||||
echo "Getting server and mirror lists..."
|
||||
echo
|
||||
|
||||
bwrap --dev-bind / / --bind '/opt/durapps/spark-store/bin/apt-fast-conf/apt-fast.conf' /etc/apt-fast.conf apt-fast "$@"
|
||||
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 / / \
|
||||
--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
|
||||
|
||||
Reference in New Issue
Block a user