mirror of
https://github.com/freedoom/freedoom.git
synced 2025-09-03 10:25:46 -04:00
dist/freedoom: use exec to launch a port
exec will terminate the script itself as well as returning the exit code from the port.
This commit is contained in:
parent
096efb5150
commit
f840aaa8f1
1 changed files with 2 additions and 4 deletions
6
dist/freedoom
vendored
6
dist/freedoom
vendored
|
@ -39,8 +39,7 @@ if [ -z "$PORT" ] && [ -h "$HOME"/.doomport ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$PORT" ]; then
|
if [ "$PORT" ]; then
|
||||||
"$PORT" -iwad $IWAD "$@"
|
exec "$PORT" -iwad "$IWAD" "$@"
|
||||||
exit 0
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dirpath=$(eval echo "\${PATH}" 2>/dev/null | tr : ' ')
|
dirpath=$(eval echo "\${PATH}" 2>/dev/null | tr : ' ')
|
||||||
|
@ -49,8 +48,7 @@ for port in $PORTS; do
|
||||||
for dir in $dirpath; do
|
for dir in $dirpath; do
|
||||||
for file in "$dir"/"$port"; do
|
for file in "$dir"/"$port"; do
|
||||||
if [ -f "$file" ] && [ -x "$file" ]; then
|
if [ -f "$file" ] && [ -x "$file" ]; then
|
||||||
"$file" -iwad $IWAD "$@"
|
exec "$file" -iwad "$IWAD" "$@"
|
||||||
exit 0
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue