mirror of
https://github.com/freedoom/freedoom.git
synced 2025-09-02 07:25:45 -04:00
dist/freedoom: use DOOMPORT envvar rather than PORT (breaking change)
PORT is too generic, especially if refering to TCP/UDP ports, and if those are set, the freedoom script may not work properly. DOOMPORT is a reasonable alternative.
This commit is contained in:
parent
96b28272a6
commit
fe7d6f864a
2 changed files with 15 additions and 13 deletions
10
dist/freedoom
vendored
10
dist/freedoom
vendored
|
@ -12,7 +12,7 @@ PORTS="doom odamex crispy-doom prboom-plus eternity gzdoom chocolate-doom"
|
||||||
|
|
||||||
if [ $# -gt 0 ]; then
|
if [ $# -gt 0 ]; then
|
||||||
if [ "$1" = "-p" ]; then
|
if [ "$1" = "-p" ]; then
|
||||||
PORT="$2"
|
DOOMPORT="$2"
|
||||||
shift; shift
|
shift; shift
|
||||||
elif [ "$1" = "--" ]; then
|
elif [ "$1" = "--" ]; then
|
||||||
shift
|
shift
|
||||||
|
@ -31,15 +31,15 @@ case "$(basename "$0")" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ -z "$PORT" ] && [ -h "$HOME"/.doomport ]; then
|
if [ -z "$DOOMPORT" ] && [ -h "$HOME"/.doomport ]; then
|
||||||
if [ -f "$(readlink -f "$HOME"/.doomport)" ] \
|
if [ -f "$(readlink -f "$HOME"/.doomport)" ] \
|
||||||
&& [ -x "$(readlink -f "$HOME"/.doomport)" ]; then
|
&& [ -x "$(readlink -f "$HOME"/.doomport)" ]; then
|
||||||
PORT="$(readlink -f "$HOME"/.doomport)"
|
DOOMPORT="$(readlink -f "$HOME"/.doomport)"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$PORT" ]; then
|
if [ "$DOOMPORT" ]; then
|
||||||
exec "$PORT" -iwad "$IWAD" "$@"
|
exec "$DOOMPORT" -iwad "$IWAD" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dirpath=$(eval echo "\${PATH}" 2>/dev/null | tr : ' ')
|
dirpath=$(eval echo "\${PATH}" 2>/dev/null | tr : ' ')
|
||||||
|
|
18
dist/freedoom.adoc
vendored
18
dist/freedoom.adoc
vendored
|
@ -8,7 +8,7 @@ freedoom - Automatically launch Freedoom with an engine
|
||||||
|
|
||||||
SYNOPSIS
|
SYNOPSIS
|
||||||
--------
|
--------
|
||||||
*freedoom* [_-p_ _PORT_|_--_] [_ARGS_]
|
*freedoom* [_-p_ _DOOMPORT_|_--_] [_ARGS_]
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
-----------
|
-----------
|
||||||
|
@ -21,13 +21,15 @@ active community since 1993.
|
||||||
|
|
||||||
This command is a simple shell script to assist in running Freedoom,
|
This command is a simple shell script to assist in running Freedoom,
|
||||||
which is not a game engine itself nor part of any engine project, but
|
which is not a game engine itself nor part of any engine project, but
|
||||||
playing Freedoom should remain simple. Only accepted as the first
|
playing Freedoom should remain simple. The script tries to
|
||||||
argument, you may pass _-p PORT_, which will run Freedoom using the
|
automatically select an engine based on a hard-coded list, but three
|
||||||
_PORT_ specified. As an alternative, you may make a symbolic link
|
overrides are available, in order of precedence: command-line
|
||||||
named +$HOME/.doomport+ to your preferred port. A port specified on
|
argument, environment variable, and a +$HOME/.doomport+ symbolic link.
|
||||||
the command line explicitly overrides +$HOME/.doomport+, whereas the
|
Passing _-p DOOMPORT_ runs Freedoom using the _DOOMPORT_ specified.
|
||||||
existence of the symbolic link will override the detection of port
|
Setting the _DOOMPORT_ environment variable is similar, running the
|
||||||
based on a hard-coded list.
|
engine specified in the variable. An additional permanent setting is
|
||||||
|
via the +$HOME/.doomport+ symbolic link, which may point to an
|
||||||
|
executable to run.
|
||||||
|
|
||||||
Additional arguments passed to the program, or after specifying _--_
|
Additional arguments passed to the program, or after specifying _--_
|
||||||
as the first option, will be passed to the engine being called. This
|
as the first option, will be passed to the engine being called. This
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue