mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-10-19 00:32:21 +08:00
* !61 $1为policy时,apt-fast换成apt * 手动更新时也重新获取源文件 * 修改: tool/ss-apt-fast * * 调整 现在与系统更新分开,不再导致更新失败
34 lines
1.1 KiB
Plaintext
Executable File
34 lines
1.1 KiB
Plaintext
Executable File
#/bin/bash
|
||
|
||
|
||
DEPEND=`which apt-fast`
|
||
if [ "$DEPEND" = "" ] ; then
|
||
echo "未安装依赖:apt-fast 开始安装"
|
||
sudo apt install apt-fast -y
|
||
fi
|
||
|
||
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 / / \
|
||
--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
|