#/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