From b36e47ca3860f7da5c54c1bf3de4f598fb06151e Mon Sep 17 00:00:00 2001 From: Matan Sarsha Date: Sat, 31 Aug 2024 16:31:29 +0300 Subject: [PATCH] feat(scripts): add free games claimer script --- install/freegamesclaimer-install.sh | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/install/freegamesclaimer-install.sh b/install/freegamesclaimer-install.sh index 19a99f60..4f89c9aa 100644 --- a/install/freegamesclaimer-install.sh +++ b/install/freegamesclaimer-install.sh @@ -73,9 +73,26 @@ cat </opt/freegamesclaimer/data/config.env EOF msg_ok "Created dummy config file" -msg_info "Select gaming services to claim games for" -CHOICES=$(whiptail --title "Tools to install" --checklist "Choose something" 20 78 4 "NTP" "NTP setup" OFF "Perl" "Perl install" OFF "Ruby" "Ruby install" OFF "Python" "Python install" OFF 3>&1 1>&2 2>&3) -msg_ok "Selected ${CHOICES}" +msg_info "Initializing gaming services to claim games for" +CHOICES=$(whiptail --title "Select game services" --checklist "Select services" 20 78 4 "EPIC" "Epic Games" OFF "GOG" "Good Old Games" OFF 3>&1 1>&2 2>&3) + +if [ ! -z "$CHOICES" ]; then + for CHOICE in $CHOICES; do + case "$CHOICE" in + "EPIC") + $STD node epic-games + ;; + "GOG") + $STD node gog + ;; + *) + echo "Unsupported item $CHOICE!" >&2 + exit 1 + ;; + esac + done + fi +msg_ok "Services initialized: ${CHOICES}" motd_ssh customize