distribution/packages/games/emulators/dosbox-sdl2/scripts/dosbox.start
2022-02-05 09:23:32 -05:00

26 lines
633 B
Bash
Executable file

#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2018-present Frank Hartung (supervisedthinking (@) gmail.com)
# Source predefined functions and variables
. /etc/profile
set_audio pulseaudio
# Set common variables
RR_DOSBOX_HOME=/storage/.dosbox
RR_DOSBOX_HOME_CONFIG=/storage/.config/dosbox
# Create symlink to config dir
if [ ! -L ${RR_DOSBOX_HOME} ]; then
if [ -d ${RR_DOSBOX_HOME} ]; then
cp -rf ${RR_DOSBOX_HOME} ${RR_DOSBOX_HOME_CONFIG}
rm -rf ${RR_DOSBOX_HOME}
fi
ln -sf ${RR_DOSBOX_HOME_CONFIG} ${RR_DOSBOX_HOME}
fi
# Run the emulator
dosbox "$@" > /tmp/logs/dosbox.log 2>&1
set_audio default