From a00659dd45cd97a9f4a27a7b48e9d598910a9b85 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Tue, 1 Aug 2023 16:08:20 -0400 Subject: [PATCH] More work on Slay the Spire installer. GOgs version of the installer mostly working. Still need to add the included modes. --- linux-game-manager.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) mode change 100755 => 100644 linux-game-manager.sh diff --git a/linux-game-manager.sh b/linux-game-manager.sh old mode 100755 new mode 100644 index 6680192..c985ef0 --- a/linux-game-manager.sh +++ b/linux-game-manager.sh @@ -707,19 +707,27 @@ case "${game}" in steamcmd +@sSteamCmdForcePlatformType linux +login "$steamUser" "$steamPass" +force_install_dir "${HOME}/.local/games/SlayTheSpire" +app_update "$appId" +quit else DISPLAY="" - find ~/Downloads -maxdepth 1 -type f -name './slay_the_spire_2020_12_15_8735c9fe3cc2280b76aa3ec47c953352a7df1f65_43444.sh' -exec bash "{}" \; || - find ~/Desktop -maxdepth 1 -type f -name './slay_the_spire_2020_12_15_8735c9fe3cc2280b76aa3ec47c953352a7df1f65_43444.sh' -exec bash "{}" \; + find ~/Downloads -maxdepth 1 -type f -name 'slay_the_spire_2020_12_15_8735c9fe3cc2280b76aa3ec47c953352a7df1f65_43444.sh' -exec bash "{}" \; || + find ~/Desktop -maxdepth 1 -type f -name 'slay_the_spire_2020_12_15_8735c9fe3cc2280b76aa3ec47c953352a7df1f65_43444.sh' -exec bash "{}" \; + if [[ $? -eq 0 ]]; then + ln -sf "${HOME}/GOG Games/Slay the Spire/game" "${HOME}/.local/games/SlayTheSpire" || + { echo "Error creating link." + exit 1; } + else + echo "Error installing game." + exit 1 + fi fi # Move files into place - mkdir -p ~/.config/ModTheSpire/ + mkdir -p "${HOME}/.config/ModTheSpire" if [[ -f ~"/.config/ModTheSpire/mod_lists.json" ]]; then dialog --backtitle "Linux Game manager" \ --yesno "Existing mod_lists.json file found. Would you like to replace it?" -1 -1 --stdout && - cp -v .files/SlayTheSpire/mod_lists.json ~"/.config/ModTheSpire/mod_lists.json" + cp -v .files/SlayTheSpire/mod_lists.json "${HOME}/.config/ModTheSpire/mod_lists.json" else - cp -v .files/SlayTheSpire/mod_lists.json ~"/.config/ModTheSpire/mod_lists.json" + cp -v .files/SlayTheSpire/mod_lists.json "${HOME}/.config/ModTheSpire/mod_lists.json" fi - cp -v .files/SlayTheSpire/MTS.sh ~/.local/games/SlayTheSpire/ + cp -v .files/SlayTheSpire/MTS.sh "${HOME}/.local/games/SlayTheSpire/" launcherPath="$(readlink -f "$0")" launcherPath="${launcherPath%/*}" add_launcher "${launcherPath}/.scripts/SlayTheSpire.sh"