mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-10-12 21:32:21 +08:00
commit
3889b477e1
@ -225,7 +225,9 @@ _create_lock()
|
|||||||
{
|
{
|
||||||
eval "exec $LCK_FD>\"$LCK_FILE.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
|
trap "cleanup_aptfast; exit 1" INT TERM
|
||||||
|
|
||||||
flock -n $LCK_FD || { msg_already_running; exit 1; }
|
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.
|
# Globals to save package name, version, size and overall size.
|
||||||
DOWNLOAD_DISPLAY=
|
DOWNLOAD_DISPLAY=
|
||||||
DOWNLOAD_SIZE=0
|
DOWNLOAD_SIZE=0
|
||||||
|
|
||||||
# Get the package URLs.
|
# Get the package URLs.
|
||||||
get_uris(){
|
get_uris(){
|
||||||
|
|
||||||
if [ ! -d "$(dirname "$DLLIST")" ]
|
if [ ! -d "$(dirname "$DLLIST")" ]
|
||||||
then
|
then
|
||||||
if ! mkdir -p -- "$(dirname "$DLLIST")"
|
if ! mkdir -p -- "$(dirname "$DLLIST")"
|
||||||
@ -449,6 +453,7 @@ display_downloadfile(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Create and insert a PID number to lockfile.
|
# Create and insert a PID number to lockfile.
|
||||||
|
|
||||||
_create_lock
|
_create_lock
|
||||||
|
|
||||||
# Make sure aria2c (in general first parameter from _DOWNLOADER) is available.
|
# Make sure aria2c (in general first parameter from _DOWNLOADER) is available.
|
||||||
@ -548,7 +553,6 @@ if [ "$option" == "install" ]; then
|
|||||||
REMOVE_WORKING_MESSAGE=y
|
REMOVE_WORKING_MESSAGE=y
|
||||||
|
|
||||||
get_uris "$@"
|
get_uris "$@"
|
||||||
|
|
||||||
[ -t 1 ] && [ -n "$REMOVE_WORKING_MESSAGE" ] && tput cuu 1 && tput el && tput cuu 1
|
[ -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.
|
# Test /tmp/apt-fast.list file exists and not just the apt-fast comment line.
|
||||||
# Then download all files from the list.
|
# 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
|
${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"
|
echo -e "\e[1;33m$TRANSHELL_CONTENT_PLEASE_USE_APTSS_INSTEAD_OF_APT\e[0m"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
elif [ "$1" = "download" ];then
|
elif [ "$1" = "download" ];then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user