You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/games-action/swordandsworcery/files/swordandsworcery-wrapper

24 lines
641 B

#!/bin/sh
# Get game directory
GAMEDIR="@GAMEDIR@"
LIB=$GAMEDIR/lib
BIN=$GAMEDIR/bin
# Ensure the log directory exists
LOGDIR=~/.capy/SwordAndSworcery
[ -e ~/.capy ] || mkdir ~/.capy
[ -e ~/.capy/SwordAndSworcery ] || mkdir ~/.capy/SwordAndSworcery
# For multi-monitor displays, choose a screen to display on to avoid having
# the game be displayed in the middle across both screens in fullscreen mode
#export SDL_VIDEO_FULLSCREEN_DISPLAY=0
# Modify library paths here
export LD_LIBRARY_PATH="$LIB:$LD_LIBRARY_PATH"
# Run the game and try to log any errors if any
cd "$BIN"
exec ./swordandsworcery $@ 2>&1 | tee -a $LOGDIR/log.txt
exit