diff --git a/.install/Wicked Quest.sh b/.install/Wicked Quest.sh new file mode 100644 index 0000000..05119aa --- /dev/null +++ b/.install/Wicked Quest.sh @@ -0,0 +1,12 @@ +local arch=$(uname -m) +local gameName + +if [[ "$arch" == "aarch64" ]]; then + gameName="wicked_quest-linux-aarch64.zip" +else + gameName="wicked_quest-linux-x86_64.zip" +fi + +get_installer "$gameName" "https://stormdragon2976.itch.io/wicked-quest" +mkdir -p "${installPath}/Wicked_Quest" +unzip -d "${installPath}/" "${cache}/$gameName" diff --git a/.launch/Wicked Quest.game b/.launch/Wicked Quest.game new file mode 100644 index 0000000..a146c1e --- /dev/null +++ b/.launch/Wicked Quest.game @@ -0,0 +1,7 @@ +local arch=$(uname -m) +if [[ "$arch" == "aarch64" ]]; then + pushd "${installPath}/wicked_quest-linux-aarch64" +else + pushd "${installPath}/wicked_quest-linux-x86_64" +fi +./wicked_quest diff --git a/.update/Wicked Quest.sh b/.update/Wicked Quest.sh new file mode 100644 index 0000000..5644bf0 --- /dev/null +++ b/.update/Wicked Quest.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +run_update() { + local installPath="${HOME}/.local/games" + local arch + arch=$(uname -m) + local gameName + local cache="${HOME}/.cache/lgm" + + if [[ "$arch" == "aarch64" ]]; then + gameName="wicked_quest-linux-aarch64.zip" + else + gameName="wicked_quest-linux-x86_64.zip" + fi + + # Look for the game file in common download locations + for i in ~/Downloads ~/Desktop ; do + find $i -type f -name "$gameName" -exec mv -v {} "${cache}/" \; + done + + # If the file is still not available abort. + if [[ ! -f "${cache}/$gameName" ]]; then + dialog --backtitle "Linux Game Manager" --msgbox "Couldn't find $gameName. Please download the file from https://stormdragon2976.itch.io/wicked-quest and try again." -1 -1 + exit 1 + fi + + unzip -od "${installPath}/" "${cache}/$gameName" +}