Cleanup Bash scripts.

This makes them pass shellcheck. Except for a few unused
export warnings.

I also wonder if the majority of these files should be
in the root of the project, or should be moved to "build-scripts"
(or should still even exist).

a few minor changes

one more minor changes
This commit is contained in:
Robert de Rooy
2023-04-15 15:39:25 +02:00
parent f11408c5a4
commit 694cc766a4
49 changed files with 862 additions and 766 deletions

View File

@@ -2,19 +2,20 @@
# allow 32-bit on 64-bit (x86) builds
if [ "$1" == "32" ]; then
export CC=`which gcc`" -m32"
export CXX=`which g++`" -m32"
CC="$(which gcc) -m32"
CXX="$(which g++) -m32"
export CC CXX
shift
opt="--host=i686-pc-linux-gnu --target=i686-pc-linux-gnu"
fi
# Jonathan C dev hack: refer to LNKDOS16 in /usr/src/doslib
doslib=
if [ -d /usr/src/doslib ]; then doslib=/usr/src/doslib; fi
if [ -d /usr/src/doslib ]; then doslib="/usr/src/doslib"; fi
if [ -n "$doslib" ]; then
if [ -x "$doslib/tool/linker/linux-host/lnkdos16" ]; then
export PATH="$doslib/tool/linker/linux-host:$PATH"
if [ -n "${doslib}" ]; then
if [ -x "${doslib}/tool/linker/linux-host/lnkdos16" ]; then
export PATH="${doslib}/tool/linker/linux-host:${PATH}"
fi
fi
@@ -37,6 +38,6 @@ echo Compiling our internal SDLnet 1.x
# now compile ourself
echo Compiling DOSBox-X
chmod +x configure
./configure --enable-debug=heavy --prefix=/usr "$@" $opt || exit 1
./configure --enable-debug=heavy --prefix=/usr "${@}" "${opt}" || exit 1
make -j3 || exit 1