From 13fdc34017287e10d0f18c41b1d5f5d80878e1d2 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Fri, 9 Aug 2024 23:41:58 +0200 Subject: [PATCH] Allow download URL customization --- osuboot.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osuboot.sh b/osuboot.sh index 922d8b5..ca1d6c7 100755 --- a/osuboot.sh +++ b/osuboot.sh @@ -36,6 +36,8 @@ elif [ "${OSUBOOT_MAX_CACHE_TIME}" -lt "1" ]; then echo "Initialization error: \$OSUBOOT_MAX_CACHE_TIME must be at least 1" exit 1 fi +# DOWNLOAD_URL +[[ -z "${OSUBOOT_DOWNLOAD_URL}" ]] && OSUBOOT_DOWNLOAD_URL="https://github.com/ppy/osu/releases/latest/download/osu.AppImage" # Display startup messages echo -en "${COLOR_SPECIAL}" @@ -100,7 +102,7 @@ echo -en "${COLOR_DEFAULT}:: Downloading osu!lazer" if [ -z "${OSUBOOT_DRYRUN}" ]; then if [ ! -f "$HOME/.cache/osu.AppImage" ] || [ -n "$(find "$HOME/.cache/osu.AppImage" -ctime "+${OSUBOOT_MAX_INITIALIZATION_TIME}" 2>/dev/null)" ]; then echo -e "${RESET}" - wget --quiet --show-progress -O "$HOME/.cache/osu.AppImage.tmp" "https://github.com/ppy/osu/releases/latest/download/osu.AppImage" + wget --quiet --show-progress -O "$HOME/.cache/osu.AppImage.tmp" "${OSUBOOT_DOWNLOAD_URL}" mv "${HOME}/.cache/osu.AppImage.tmp" "${HOME}/.cache/osu.AppImage" chmod +x "${HOME}/.cache/osu.AppImage" else