Allow download URL customization
This commit is contained in:
parent
9c14e94090
commit
13fdc34017
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue