ci: Make some build script variables local as they should be
This commit is contained in:
26
.ci/build.sh
26
.ci/build.sh
@@ -108,8 +108,8 @@ build() {
|
|||||||
if is_windows
|
if is_windows
|
||||||
then
|
then
|
||||||
# Switch into the correct MSYSTEM if required.
|
# Switch into the correct MSYSTEM if required.
|
||||||
msys=MINGW$arch
|
local msys=MINGW$arch
|
||||||
[ ! -d "/$msys" ] && msys=CLANG$arch
|
[ ! -d "/$msys" ] && local msys=CLANG$arch
|
||||||
if [ -d "/$msys" ]
|
if [ -d "/$msys" ]
|
||||||
then
|
then
|
||||||
if [ "$MSYSTEM" != "$msys" ]
|
if [ "$MSYSTEM" != "$msys" ]
|
||||||
@@ -133,10 +133,10 @@ build() {
|
|||||||
else
|
else
|
||||||
# Determine Debian architecture.
|
# Determine Debian architecture.
|
||||||
case $arch in
|
case $arch in
|
||||||
x86) arch_deb="i386";;
|
x86) local arch_deb="i386";;
|
||||||
x86_64) arch_deb="amd64";;
|
x86_64) local arch_deb="amd64";;
|
||||||
arm32) arch_deb="armhf";;
|
arm32) local arch_deb="armhf";;
|
||||||
*) arch_deb="$arch";;
|
*) local arch_deb="$arch";;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Establish general and architecture-specific dependencies.
|
# Establish general and architecture-specific dependencies.
|
||||||
@@ -153,16 +153,16 @@ build() {
|
|||||||
for pkg in libc6-dev linux-libc-dev libopenal-dev libfreetype6-dev libsdl2-dev libpng-dev
|
for pkg in libc6-dev linux-libc-dev libopenal-dev libfreetype6-dev libsdl2-dev libpng-dev
|
||||||
do
|
do
|
||||||
local libpkgs="$libpkgs $pkg:$arch_deb"
|
local libpkgs="$libpkgs $pkg:$arch_deb"
|
||||||
length=$(echo -n $pkg | sed 's/-dev$//g' | wc -c)
|
local length=$(echo -n $pkg | sed 's/-dev$//g' | wc -c)
|
||||||
[ $length -gt $longest_libpkg ] && longest_libpkg=$length
|
[ $length -gt $longest_libpkg ] && longest_libpkg=$length
|
||||||
done
|
done
|
||||||
|
|
||||||
# Determine GNU toolchain architecture.
|
# Determine GNU toolchain architecture.
|
||||||
case $arch in
|
case $arch in
|
||||||
x86) arch_gnu="i686-linux-gnu";;
|
x86) local arch_gnu="i686-linux-gnu";;
|
||||||
arm32) arch_gnu="arm-linux-gnueabihf";;
|
arm32) local arch_gnu="arm-linux-gnueabihf";;
|
||||||
arm64) arch_gnu="aarch64-linux-gnu";;
|
arm64) local arch_gnu="aarch64-linux-gnu";;
|
||||||
*) arch_gnu="$arch-linux-gnu";;
|
*) local arch_gnu="$arch-linux-gnu";;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Create CMake toolchain file.
|
# Create CMake toolchain file.
|
||||||
@@ -254,8 +254,8 @@ EOF
|
|||||||
then
|
then
|
||||||
# Determine Program Files directory for Ghostscript and 7-Zip.
|
# Determine Program Files directory for Ghostscript and 7-Zip.
|
||||||
# Manual checks because MSYS is bad at passing the ProgramFiles variables.
|
# Manual checks because MSYS is bad at passing the ProgramFiles variables.
|
||||||
pf="/c/Program Files"
|
local pf="/c/Program Files"
|
||||||
sevenzip="$pf/7-Zip/7z.exe"
|
local sevenzip="$pf/7-Zip/7z.exe"
|
||||||
[ "$arch" = "32" -a -d "/c/Program Files (x86)" ] && pf="/c/Program Files (x86)"
|
[ "$arch" = "32" -a -d "/c/Program Files (x86)" ] && pf="/c/Program Files (x86)"
|
||||||
|
|
||||||
# Archive freetype from local MSYS installation.
|
# Archive freetype from local MSYS installation.
|
||||||
|
Reference in New Issue
Block a user