update tool/aptss.

Signed-off-by: shenmo <jifengshenmo@outlook.com>
This commit is contained in:
shenmo 2024-04-09 04:09:53 +00:00 committed by Gitee
parent 59e4da7b40
commit 99fae1bb3f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
SPARK_CORE_SERVER_URL="https://d.store.deepinos.org.cn"
source /opt/durapps/spark-store/bin/bashimport/transhell.amber source /opt/durapps/spark-store/bin/bashimport/transhell.amber
load_transhell load_transhell
@ -44,7 +46,7 @@ if [ ! -e "/tmp/aptss-conf/apt-fast.conf" ];then
mkdir -p /tmp/aptss-conf/ mkdir -p /tmp/aptss-conf/
echo -e "\e[1;32m${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}\e[0m" echo -e "\e[1;32m${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}\e[0m"
echo echo
curl --progress-bar -o /tmp/aptss-conf/apt-fast.conf "https://d.store.deepinos.org.cn/apt-fast.conf" curl --progress-bar -o /tmp/aptss-conf/apt-fast.conf "${SPARK_CORE_SERVER_URL}/apt-fast.conf"
chmod -R 755 /tmp/aptss-conf chmod -R 755 /tmp/aptss-conf
fi fi
@ -55,10 +57,10 @@ if [ ! -e "/var/lib/aptss/lists/d.spark-app.store_${STORE_URL}_Packages" ] && [
mkdir -p /tmp/aptss-conf/ mkdir -p /tmp/aptss-conf/
echo -e "\e[1;32m${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}\e[0m" echo -e "\e[1;32m${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}\e[0m"
echo echo
curl --silent -o /tmp/aptss-conf/apt-fast.conf "https://d.store.deepinos.org.cn/apt-fast.conf" curl --silent -o /tmp/aptss-conf/apt-fast.conf "${SPARK_CORE_SERVER_URL}/apt-fast.conf"
chmod -R 755 /tmp/aptss-conf chmod -R 755 /tmp/aptss-conf
curl --silent -o /opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list "https://d.store.deepinos.org.cn/sparkstore${STORE_LIST_URL}.list" curl --silent -o /opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list "${SPARK_CORE_SERVER_URL}/sparkstore${STORE_LIST_URL}.list"
/usr/bin/apt update -c /opt/durapps/spark-store/bin/apt-fast-conf/aptss-apt.conf /usr/bin/apt update -c /opt/durapps/spark-store/bin/apt-fast-conf/aptss-apt.conf
#只更新星火源 #只更新星火源
@ -103,10 +105,10 @@ elif [ "$1" = "ssupdate" ];then
mkdir -p /tmp/aptss-conf/ mkdir -p /tmp/aptss-conf/
echo -e "\e[1;32m${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}\e[0m" echo -e "\e[1;32m${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}\e[0m"
echo echo
curl --silent -o /tmp/aptss-conf/apt-fast.conf "https://d.store.deepinos.org.cn/apt-fast.conf" curl --silent -o /tmp/aptss-conf/apt-fast.conf "${SPARK_CORE_SERVER_URL}/apt-fast.conf"
chmod -R 755 /tmp/aptss-conf chmod -R 755 /tmp/aptss-conf
curl --silent -o /opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list "https://d.store.deepinos.org.cn/sparkstore${STORE_LIST_URL}.list" curl --silent -o /opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list "${SPARK_CORE_SERVER_URL}/sparkstore${STORE_LIST_URL}.list"
/usr/bin/apt update -c /opt/durapps/spark-store/bin/apt-fast-conf/aptss-apt.conf -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" -o Dir::Etc::sourcelist="/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list" /usr/bin/apt update -c /opt/durapps/spark-store/bin/apt-fast-conf/aptss-apt.conf -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" -o Dir::Etc::sourcelist="/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list"
@ -116,9 +118,9 @@ curl --silent -o /opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/spar
elif [ "$1" = "update" ];then elif [ "$1" = "update" ];then
echo -e "\e[1;32m${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}\e[0m" echo -e "\e[1;32m${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}\e[0m"
echo echo
curl --progress-bar -o /opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list "https://d.store.deepinos.org.cn/sparkstore${STORE_LIST_URL}.list" curl --progress-bar -o /opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list "${SPARK_CORE_SERVER_URL}/sparkstore${STORE_LIST_URL}.list"
mkdir -p /tmp/aptss-conf/ mkdir -p /tmp/aptss-conf/
curl --progress-bar -o /tmp/aptss-conf/apt-fast.conf "https://d.store.deepinos.org.cn/apt-fast.conf" curl --progress-bar -o /tmp/aptss-conf/apt-fast.conf "${SPARK_CORE_SERVER_URL}/apt-fast.conf"
chmod -R 755 /tmp/aptss-conf chmod -R 755 /tmp/aptss-conf
### 额外一份拿来给aptss自动补全用 ### 额外一份拿来给aptss自动补全用
/usr/bin/apt "$@" -c /opt/durapps/spark-store/bin/apt-fast-conf/aptss-apt.conf /usr/bin/apt "$@" -c /opt/durapps/spark-store/bin/apt-fast-conf/aptss-apt.conf
@ -127,4 +129,3 @@ else
/usr/bin/apt "$@" -c /opt/durapps/spark-store/bin/apt-fast-conf/aptss-apt.conf /usr/bin/apt "$@" -c /opt/durapps/spark-store/bin/apt-fast-conf/aptss-apt.conf
fi fi