#!/usr/bin/env bash
# Ragol's Wrath updater for Linux / Steam Deck. Run:  bash update-linux.sh
# Checks the website for a newer SIGNED client release and applies it to this folder (ragolswrath_update.py does the work;
# it refuses anything unsigned or tampered). Safe to run any time; running it twice does nothing the second time.
cd "$(dirname "$(readlink -f "$0")")" || exit 2
PY=$(command -v python3 || command -v python)
if [ -z "$PY" ]; then
  echo "update: python3 was not found. On SteamOS it is built in; on other Linux install it (e.g. sudo apt install python3)."
  exit 2
fi
exec "$PY" ./ragolswrath_update.py --root "$PWD" "$@"
