Fix issue where quoted paths dont work with lzdoom or gzdoom start scripts

This commit is contained in:
travis134 2022-08-21 16:49:37 -07:00
parent 938a88e838
commit 0bd317bfb9
No known key found for this signature in database
GPG key ID: FB8B9EEA5CEF2984
2 changed files with 22 additions and 10 deletions

View file

@ -11,13 +11,11 @@ RUN_DIR="/storage/roms/doom"
CONFIG="/storage/.config/game/gzdoom/gzdoom.ini"
SAVE_DIR="/storage/roms/gamedata/gzdoom"
if [ ! -L "/storage/.config/gzdoom" ]
then
if [ ! -L "/storage/.config/gzdoom" ]; then
ln -sf "/storage/.config/game/gzdoom" "/storage/.config/gzdoom"
fi
if [ ! -f "/storage/.config/game/gzdoom/gzdoom.ini" ]
then
if [ ! -f "/storage/.config/game/gzdoom/gzdoom.ini" ]; then
cp -rf /usr/config/game/gzdoom/gzdoom.ini /storage/.config/game/gzdoom/
fi
@ -34,9 +32,17 @@ if [ ${EXT} == "doom" ]; then
dos2unix "${1}"
while IFS== read -r key value; do
if [ "$key" == "IWAD" ]; then
# Unquote
temp="${value}"
temp="${temp%\"}"
temp="${temp#\"}"
params+=" -iwad $value"
fi
if [ "$key" == "MOD" ]; then
# Unquote
temp="${value}"
temp="${temp%\"}"
temp="${temp#\"}"
params+=" -file $value"
fi
done <"${1}"

View file

@ -11,13 +11,11 @@ RUN_DIR="/storage/roms/doom"
CONFIG="/storage/.config/game/lzdoom/lzdoom.ini"
SAVE_DIR="/storage/roms/gamedata/lzdoom"
if [ ! -L "/storage/.config/lzdoom" ]
then
if [ ! -L "/storage/.config/lzdoom" ]; then
ln -sf "/storage/.config/game/lzdoom" "/storage/.config/lzdoom"
fi
if [ ! -f "/storage/.config/game/lzdoom/lzdoom.ini" ]
then
if [ ! -f "/storage/.config/game/lzdoom/lzdoom.ini" ]; then
cp -rf /usr/config/game/lzdoom/lzdoom.ini /storage/.config/game/lzdoom/
fi
@ -34,9 +32,17 @@ if [ ${EXT} == "doom" ]; then
dos2unix "${1}"
while IFS== read -r key value; do
if [ "$key" == "IWAD" ]; then
# Unquote
temp="${value}"
temp="${temp%\"}"
temp="${temp#\"}"
params+=" -iwad $value"
fi
if [ "$key" == "MOD" ]; then
# Unquote
temp="${value}"
temp="${temp%\"}"
temp="${temp#\"}"
params+=" -file $value"
fi
done <"${1}"