mirror of
https://github.com/freedoom/freedoom.git
synced 2025-09-01 13:25:46 -04:00
dist/freedoom: Set DOOMWADPATH with sensible default value if unset
Engines such as Odamex may not have a default search path and simply search for freedoom1.wad relative to the current directory. This can cause an unexpected WAD file not found error when executing the freedoom script. This issue is mitigated by setting a default DOOMWADPATH environment variable with sensible search paths, if it is not already set. All engines listed in the PORTS variable support the DOOMWADPATH environment variable, which makes it a simple and convenient way of helping prevent this error.
This commit is contained in:
parent
b2ca8cbfde
commit
47dd54d5ce
1 changed files with 4 additions and 0 deletions
4
dist/freedoom
vendored
4
dist/freedoom
vendored
|
@ -31,6 +31,10 @@ case "$(basename "$0")" in
|
|||
;;
|
||||
esac
|
||||
|
||||
if [ -z "$DOOMWADPATH" ]; then
|
||||
export DOOMWADPATH="/usr/share/doom:/usr/share/games/doom:/usr/local/share/doom:/usr/local/share/games/doom"
|
||||
fi
|
||||
|
||||
if [ -z "$DOOMPORT" ] && [ -h "$HOME"/.doomport ]; then
|
||||
if [ -f "$(readlink -f "$HOME"/.doomport)" ] \
|
||||
&& [ -x "$(readlink -f "$HOME"/.doomport)" ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue