/usr/games/freedoom2 is in freedoom 0.10.1-2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | #!/bin/sh -
# These ports should really be ordered by ease-of-use. Most likely
# advanced users with many ports installed will invoke their preferred
# one directly rather than depend on this script...
PORTS="boom doom odamex prboom-plus prboom eternity gzdoom zdoom chocolate-doom"
# Just a single argument starting the command is allowed, -p, in order
# to explicitly set a port on the command line. -- is also supported
# so that -p can be instead sent directly to the port's argument list.
if [ $# -gt 0 ]; then
if [ "$1" = "-p" ]; then
PORT="$2"
shift; shift
elif [ "$1" = "--" ]; then
shift
fi
fi
case "$(basename "$0")" in
freedm)
IWAD=freedm.wad
;;
freedoom1)
IWAD=freedoom1.wad
;;
freedoom2 | *)
IWAD=freedoom2.wad
;;
esac
if [ -z "$PORT" ] && [ -h "$HOME"/.doomport ]; then
if [ -f "$(readlink -f "$HOME"/.doomport)" ] \
&& [ -x "$(readlink -f "$HOME"/.doomport)" ]; then
PORT="$(readlink -f "$HOME"/.doomport)"
fi
fi
if [ "$PORT" ]; then
exec "$PORT" -iwad "$IWAD" "$@"
fi
dirpath=$(eval echo "\${PATH}" 2>/dev/null | tr : ' ')
for port in $PORTS; do
for dir in $dirpath; do
for file in "$dir"/"$port"; do
if [ -f "$file" ] && [ -x "$file" ]; then
exec "$file" -iwad "$IWAD" "$@"
fi
done
done
done
# If we've reached this far, no engine was successfully executed.
# print message to stderr and exit with a status of 1.
cat <<EOF >&2
$(basename "$0") could not locate nor launch a Doom engine. Most
likely, you simply need to install one, check your distribution
package repositories for names such as "prboom" or "odamex" or seek
out one and install it manually.
If you believe you already have one, you may just need to modify your
PATH environment variable to include it, or set up the $HOME/.doomport
symbolic link to point directly to the engine of your choice.
EOF
exit 1
|