mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-13 12:22:05 +08:00
!85 修改: debian/spark-store.postinst 重命名: tool/ss-apt-fast -> tool/aptss
* 删除文件 spark-wine7-devel_7.14~spark-1_amd64.deb * final * 修改: debian/spark-store.postinst * 修改: tool/update-upgrade/ss-update-controler.sh * 修改: debian/spark-store.postinst * 只额外生成一份给aptss * 修改: debian/spark-store.postinst * 要提交的变更: * 修改: tool/aptss * 修改: debian/changelog * 修改: pkg/usr/share/bash-completion/completions/aptss * 修改: pkg/usr/share/bash-completion/completions/aptss * 修改: debian/spark-store.postinst * aa * Merge branch 'master' of https://gitee.com/deepin-community-store/spark-store * 修改: src/main.cpp * Merge branch 'master' of https://gitee.com/deepin-community-store/spark-store * 修改: debian/spark-store.postinst
This commit is contained in:
73
tool/aptss
Executable file
73
tool/aptss
Executable file
@@ -0,0 +1,73 @@
|
||||
#/bin/bash
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if [ "$1" = "install" ] || [ "$1" = "upgrade" ] || [ "$1" = "full-upgrade" ] || [ "$1" = "download" ] ; then
|
||||
|
||||
if [ ! -e "/tmp/aptss-conf/apt-fast.conf" ];then
|
||||
###刷新apt-fast配置
|
||||
mkdir -p /tmp/aptss-conf/
|
||||
echo "从服务器获取配置和镜像列表..."
|
||||
echo "Getting server and mirror lists..."
|
||||
echo
|
||||
curl --progress-bar -o /tmp/aptss-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/aptss-conf
|
||||
|
||||
fi
|
||||
|
||||
DEPEND=`which apt-fast`
|
||||
if [ "$DEPEND" = "" ] ; then
|
||||
echo "未安装依赖:apt-fast 开始安装"
|
||||
sudo aptss ssupdate && 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 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" = "ssupdate" ];then
|
||||
|
||||
mkdir -p /tmp/aptss-conf/
|
||||
echo "从服务器获取配置和镜像列表..."
|
||||
echo "Getting server and mirror lists..."
|
||||
echo
|
||||
curl --progress-bar -o /tmp/aptss-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/aptss-conf
|
||||
|
||||
sudo curl --progress-bar -o /opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list "https://gitee.com/deepin-community-store/repo_auto_update_script/raw/master/mirror-list-for-apt-fast/sources.list.d/sparkstore.list"
|
||||
### 额外一份拿来给aptss自动补全用
|
||||
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 Dir::Cache="/etc/aptss/" -o APT::Get::List-Cleanup="0"
|
||||
#只更新星火源
|
||||
|
||||
elif [ "$1" = "update" ];then
|
||||
sudo curl --progress-bar -o /opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list "https://gitee.com/deepin-community-store/repo_auto_update_script/raw/master/mirror-list-for-apt-fast/sources.list.d/sparkstore.list"
|
||||
|
||||
|
||||
mkdir -p /tmp/aptss-conf/
|
||||
echo "从服务器获取配置和镜像列表..."
|
||||
echo "Getting server and mirror lists..."
|
||||
echo
|
||||
curl --progress-bar -o /tmp/aptss-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/aptss-conf
|
||||
### 额外一份拿来给aptss自动补全用
|
||||
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 "$@" -o APT::Get::List-Cleanup="0"
|
||||
|
||||
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 "$@" -o APT::Get::List-Cleanup="0" -o Dir::Cache="/etc/aptss/"
|
||||
|
||||
else
|
||||
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 "$@"
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user