fix: now wont inform aptss everytime

This commit is contained in:
shenmo 2023-09-01 22:56:44 +08:00
parent 407ec6b573
commit d085f3de73
2 changed files with 10 additions and 5 deletions
tool

@ -1,5 +1,5 @@
#!/bin/bash
#
#
# apt-fast v1.9
# Use this just like aptitude or apt-get for faster package downloading.
#
@ -225,7 +225,9 @@ _create_lock()
{
eval "exec $LCK_FD>\"$LCK_FILE.lock\""
trap "cleanup_aptfast; exit_cleanup_state" EXIT
# trap "cleanup_aptfast; exit_cleanup_state" EXIT
# This will hide the exit code
trap "cleanup_aptfast" EXIT
trap "cleanup_aptfast; exit 1" INT TERM
flock -n $LCK_FD || { msg_already_running; exit 1; }
@ -301,8 +303,10 @@ get_mirrors(){
# Globals to save package name, version, size and overall size.
DOWNLOAD_DISPLAY=
DOWNLOAD_SIZE=0
# Get the package URLs.
get_uris(){
if [ ! -d "$(dirname "$DLLIST")" ]
then
if ! mkdir -p -- "$(dirname "$DLLIST")"
@ -449,6 +453,7 @@ display_downloadfile(){
}
# Create and insert a PID number to lockfile.
_create_lock
# Make sure aria2c (in general first parameter from _DOWNLOADER) is available.
@ -548,7 +553,6 @@ if [ "$option" == "install" ]; then
REMOVE_WORKING_MESSAGE=y
get_uris "$@"
[ -t 1 ] && [ -n "$REMOVE_WORKING_MESSAGE" ] && tput cuu 1 && tput el && tput cuu 1
# Test /tmp/apt-fast.list file exists and not just the apt-fast comment line.
# Then download all files from the list.

@ -73,9 +73,10 @@ 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
ret="$?"
if [ "$ret" -ne 0 ];then
echo -e "\e[1;33m$TRANSHELL_CONTENT_PLEASE_USE_APTSS_INSTEAD_OF_APT\e[0m"
fi
elif [ "$1" = "download" ];then