mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-13 12:22:05 +08:00
* 修复:aptss加锁失败现在会正常报错
* 新增:在aptss的特定操作时添加了提示 * 新增:在aptss提示加粗
This commit is contained in:
23
tool/aptss
23
tool/aptss
@@ -24,7 +24,7 @@ is_empty_dir(){
|
||||
|
||||
if [ "$(id -u)" != "0" ];then
|
||||
#############################无root权限时
|
||||
echo "${TRANSHELL_CONTENT_RUNNING_IN_NOT_ROOT_USER}"
|
||||
echo -e "\e[1;32m${TRANSHELL_CONTENT_RUNNING_IN_NOT_ROOT_USER}\e[0m"
|
||||
|
||||
else
|
||||
|
||||
@@ -38,7 +38,7 @@ fi
|
||||
if [ ! -e "/tmp/aptss-conf/apt-fast.conf" ];then
|
||||
###刷新apt-fast配置
|
||||
mkdir -p /tmp/aptss-conf/
|
||||
echo "${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}"
|
||||
echo -e "\e[1;32m${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}\e[0m"
|
||||
echo
|
||||
curl --progress-bar -o /tmp/aptss-conf/apt-fast.conf "https://d.store.deepinos.org.cn/apt-fast.conf"
|
||||
chmod -R 755 /tmp/aptss-conf
|
||||
@@ -49,7 +49,7 @@ fi
|
||||
if [ ! -e "/var/lib/aptss/lists/d.spark-app.store_${STORE_URL}_Packages" ] && [ ! -e "/var/lib/aptss/lists/d.store.deepinos.org.cn_${STORE_URL}_Packages" ] && [ ! -e "/var/lib/aptss/lists/mirrors.sdu.edu.cn_spark-store-repository_${STORE_URL}_Packages" ];then
|
||||
|
||||
mkdir -p /tmp/aptss-conf/
|
||||
echo "${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}"
|
||||
echo -e "\e[1;32m${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}\e[0m"
|
||||
echo
|
||||
curl --silent -o /tmp/aptss-conf/apt-fast.conf "https://d.store.deepinos.org.cn/apt-fast.conf"
|
||||
chmod -R 755 /tmp/aptss-conf
|
||||
@@ -73,7 +73,12 @@ if [ "$1" = "install" ] || [ "$1" = "upgrade" ] || [ "$1" = "full-upgrade" ] ;
|
||||
###执行
|
||||
|
||||
${SS_APT_FAST} "$@" --allow-downgrades -c /opt/durapps/spark-store/bin/apt-fast-conf/aptss-apt.conf
|
||||
|
||||
EXIT_CODE=$?
|
||||
if [ "$EXIT_CODE" != "0" ];then
|
||||
echo -e "\e[1;33m$TRANSHELL_CONTENT_PLEASE_USE_APTSS_INSTEAD_OF_APT\e[0m"
|
||||
exit
|
||||
fi
|
||||
unset EXIT_CODE
|
||||
|
||||
elif [ "$1" = "download" ];then
|
||||
|
||||
@@ -92,7 +97,7 @@ elif [ "$1" = "policy" ] || [ "$1" = "search" ];then
|
||||
elif [ "$1" = "ssupdate" ];then
|
||||
|
||||
mkdir -p /tmp/aptss-conf/
|
||||
echo "${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}"
|
||||
echo -e "\e[1;32m${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}\e[0m"
|
||||
echo
|
||||
curl --silent -o /tmp/aptss-conf/apt-fast.conf "https://d.store.deepinos.org.cn/apt-fast.conf"
|
||||
chmod -R 755 /tmp/aptss-conf
|
||||
@@ -105,12 +110,10 @@ apt update -c /opt/durapps/spark-store/bin/apt-fast-conf/aptss-apt.conf -o Dir::
|
||||
#只更新星火源
|
||||
|
||||
elif [ "$1" = "update" ];then
|
||||
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"
|
||||
|
||||
|
||||
mkdir -p /tmp/aptss-conf/
|
||||
echo "${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}"
|
||||
echo -e "\e[1;32m${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}\e[0m"
|
||||
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"
|
||||
mkdir -p /tmp/aptss-conf/
|
||||
curl --progress-bar -o /tmp/aptss-conf/apt-fast.conf "https://d.store.deepinos.org.cn/apt-fast.conf"
|
||||
chmod -R 755 /tmp/aptss-conf
|
||||
### 额外一份拿来给aptss自动补全用
|
||||
|
||||
Reference in New Issue
Block a user