download可无root运行,相应的,不会自动到最新

Signed-off-by: shenmo <jifengshenmo@outlook.com>
This commit is contained in:
shenmo 2022-09-20 04:05:25 +00:00 committed by Gitee
parent e7680fe2a0
commit 11d68fb4b5
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -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` DEPEND=`which apt-fast`
if [ "$DEPEND" = "" ] ; then if [ "$DEPEND" = "" ] ; then
@ -35,6 +35,20 @@ bwrap --dev-bind / / \
apt-fast "$@" --allow-downgrades 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 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" 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"