From 3da23b9432f7fb7d586b0bc0440e5a4b303aef4f Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sat, 14 Dec 2024 15:06:27 -0500 Subject: [PATCH] Updated Download function. --- linux-game-manager.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-game-manager.sh b/linux-game-manager.sh index 3bbd9b9..55695ee 100755 --- a/linux-game-manager.sh +++ b/linux-game-manager.sh @@ -199,12 +199,12 @@ download() { dest="${dest#*\?filename=}" dest="${dest%\?*}" # Remove the destination file if it is empty. - test -s "${cache}/${dest}" || rm -f "${cache}/${dest}" 2> /dev/null + [[ -s "${cache}/${dest}" ]] || rm -f "${cache}/${dest}" 2> /dev/null if [[ "${redownload}" == "true" ]] && [[ -e "${cache}/${dest}" ]]; then rm -v "${cache}/${dest}" fi # Skip if the item is in cache. - test -e "${cache}/${dest}" && continue + [[ -e "${cache}/${dest}" ]] && continue { if ! curl -L4 -C - --retry 10 --output "${cache}/${dest}" "${i}" ; then echo "Could not download \"$i\"..." exit 1