dosbox-x/env-gcc-9.2.sh
Robert de Rooy 694cc766a4 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
2023-04-15 15:53:08 +02:00

25 lines
421 B
Bash
Executable File

#!/usr/bin/env bash
#
# Look for GCC-9.2
x=$(which gcc-9.2 2>/dev/null)
if [ -n "${x}" ]; then
gdir=$(dirname "${x}")
elif [ -f "/usr/gcc-9.2/bin/gcc" ]; then
gdir="/usr/gcc-9.2/bin"
else
echo "Cannot find GCC 9.2"
exit 1
fi
echo "GCC is in ${gdir}"
CC="${gdir}/gcc"
CPP="${gdir}/cpp"
CXX="${gdir}/g++"
PATH="${gdir}:${PATH}"
export CC CPP CXX PATH
echo "Starting subshell. Type exit to exit."
$SHELL