Fix cache time check

This commit is contained in:
JeremyStar™ 2024-08-16 19:47:40 +02:00
parent a2150c4a78
commit dc5ce6f1f3
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -102,7 +102,7 @@ fi
# Download osu!lazer
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
if [ ! -f "$HOME/.cache/osu.AppImage" ] || [ -n "$(find "$HOME/.cache/osu.AppImage" -ctime "+${OSUBOOT_MAX_CACHE_TIME}" 2>/dev/null)" ]; then
echo -e "${RESET}"
wget --quiet --show-progress -O "$HOME/.cache/osu.AppImage.tmp" "${OSUBOOT_DOWNLOAD_URL}"
mv "${HOME}/.cache/osu.AppImage.tmp" "${HOME}/.cache/osu.AppImage"