The byondexec script supplied with recent Linux builds has a shebang line of #!/bin/sh and then uses the non-POSIX compliant [[ command.
This causes warnings on systems such as Ubuntu which fulfill /bin/sh with the largely POSIX-only Dash rather than Bash:
/home/.../work/ss13/byond/bin/byondexec: 11: /home/.../work/ss13/byond/bin/byondexec: [[: not found
Probably the shebang line should be #!/bin/bash instead.
ID:2568246
May 5 2020, 7:45 pm
|
|||||||||||||
| |||||||||||||
Feb 24 2021, 6:35 pm
|
|
bump
|
Please, don't... there are other good alternatives, but this is a quick-and-dirty one:
root@viper:/tmp/byond/bin# diff -u byondexec.orig byondexec --- byondexec.orig 2021-02-24 22:17:28.844879000 -0600 +++ byondexec 2021-02-24 22:19:26.495219000 -0600 @@ -8,9 +8,10 @@ echo "$BYOND_PROGRAM is not a valid file" exit fi -if [[ $BYOND_PROGRAM != /* ]]; then - BYOND_PROGRAM="$PWD/$BYOND_PROGRAM" -fi +case "$BYOND_PROGRAM" in + /*) ;; + *) BYOND_PROGRAM="$PWD/$BYOND_PROGRAM" ;; +esac BYOND_BIN=${BYOND_PROGRAM%/*} export BYOND_SYSTEM=${BYOND_BIN%/*} export LD_LIBRARY_PATH=$BYOND_BIN:$LD_LIBRARY_PATH |