diff options
Diffstat (limited to 'q2rtx.sh')
-rwxr-xr-x | q2rtx.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/q2rtx.sh b/q2rtx.sh new file mode 100755 index 000000000000..480a776a5422 --- /dev/null +++ b/q2rtx.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +cd /usr/share/q2rtx/bin + +BIN_PREFIX="." + +# If the game is installed via a package manager q2rtx won't be in the same +# directory as q2rtx.sh +if [[ -d "/usr/share/quake2rtx" ]]; then + BIN_PREFIX="/usr/share/quake2rtx/bin" +fi + +# Generate the user's game dir if doesn't exist +if [[ ! -d "${HOME}/.quake2rtx/baseq2" ]]; then + mkdir -p "${HOME}/.quake2rtx/baseq2" +fi + +# Only run this script on first-launch +if [[ ! -f "${HOME}/.quake2rtx/.retail_checked" ]]; then + ${BIN_PREFIX}/find-retail-paks.sh + touch ${HOME}/.quake2rtx/.retail_checked +fi + +${BIN_PREFIX}/q2rtx "$@" |