From 11d68fb4b5f49dda0eae3328360000187738f4b1 Mon Sep 17 00:00:00 2001 From: shenmo Date: Tue, 20 Sep 2022 04:05:25 +0000 Subject: [PATCH] =?UTF-8?q?download=E5=8F=AF=E6=97=A0root=E8=BF=90?= =?UTF-8?q?=E8=A1=8C=EF=BC=8C=E7=9B=B8=E5=BA=94=E7=9A=84=EF=BC=8C=E4=B8=8D?= =?UTF-8?q?=E4=BC=9A=E8=87=AA=E5=8A=A8=E5=88=B0=E6=9C=80=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shenmo --- tool/aptss | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tool/aptss b/tool/aptss index 15d96a5..e246557 100755 --- a/tool/aptss +++ b/tool/aptss @@ -18,7 +18,7 @@ fi -if [ "$1" = "install" ] || [ "$1" = "upgrade" ] || [ "$1" = "full-upgrade" ] || [ "$1" = "download" ] ; then +if [ "$1" = "install" ] || [ "$1" = "upgrade" ] || [ "$1" = "full-upgrade" ] ; then DEPEND=`which apt-fast` if [ "$DEPEND" = "" ] ; then @@ -35,6 +35,20 @@ bwrap --dev-bind / / \ apt-fast "$@" --allow-downgrades +elif [ "$1" = "download" ];then +DEPEND=`which apt-fast` +if [ "$DEPEND" = "" ] ; then +echo "未安装依赖: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 apt-fast -y +fi + +###执行 +bwrap --dev-bind / / \ + --bind '/tmp/aptss-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 "$@" --allow-downgrades + + elif [ "$1" = "policy" ] || [ "$1" = "search" ];then 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"