blob: b669026144422f7e9a2773f6476ab0398b0ae722 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/bin/sh
# Running this script with either --ncurses or --ncurses-falbback will start the game in the current terminal.
# --ncurses uses the local install of ncurses, while --ncurses-fallback uses a statically linked version with
# reduced TERM support.
pkgname=arcanefortune
if [ ! -d "${HOME}/.${pkgname}" ]; then
mkdir -p "${HOME}/.${pkgname}/game"
mkdir -p "${HOME}/.${pkgname}/game/saves"
for f in nn arcane_fortune_linux arcane_fortune_linux_ncurses arcane_fortune_linux_ncurses_fallback icon.ico; do
ln -s "/opt/${pkgname}/game/$f" "${HOME}/.${pkgname}/game/$f"
done
cp -rn "/opt/${pkgname}/game/fonts" "${HOME}/.${pkgname}/game/fonts"
cp -rn "/opt/${pkgname}/game/config" "${HOME}/.${pkgname}/game/config"
fi
cd "${HOME}/.${pkgname}/game"
if [ "$1" = "--ncurses-fallback" ]; then
shift
exec ./arcane_fortune_linux_ncurses_fallback "${@}"
elif [ "$1" = "--ncurses" ]; then
shift
exec ./arcane_fortune_linux_ncurses "${@}"
else
exec ./arcane_fortune_linux "${@}"
fi
|