distribution/packages/emulators/standalone/dosbox-x/scripts/dosbox-x.start

29 lines
706 B
Text
Raw Normal View History

2022-02-05 14:23:32 +00:00
#!/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/game/configs/dosbox-x
2022-02-05 14:23:32 +00:00
# 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
ARG="$(echo $1 | sed 's=.*/==;s/\.[^.]*$//')"
2022-03-31 10:54:36 +00:00
dosbox-x -c "${ARG}" > /var/log/dosbox-x.log 2>&1
2022-02-05 14:23:32 +00:00
set_audio default