Fixed install function.

This commit is contained in:
Storm Dragon 2024-12-15 19:37:01 -05:00
parent ff140f4298
commit 5ce1138985

View File

@ -377,6 +377,24 @@ game_installer() {
--clear \
--no-tags \
--menu "Please select a game to install" 0 0 0 "${menuList[@]}" --stdout)"
# Handle selection
if [[ -n "$game" ]]; then
if [[ "$game" == "Donate" ]]; then
open_url "https://ko-fi.com/stormux"
exit 0
fi
# Convert game name to filename format
local installScript="${0%/*}/.install/${game}.sh"
# Check if install script exists
if [[ -f "$installScript" ]]; then
# Source and execute the install script
source "$installScript"
else
dialog --backtitle "Game Installer" \
--msgbox "Installation script not found for ${game}" -1 -1
exit 1
fi
fi
exit 0
}