1
0
forked from 0ad/0ad

Format shell scripts using shfmt

This updates shell scripts to use a consistent style that can be enforced
via pre-commit hook.

As for choosing tabs over spaces, some arguments are:

- tabs can help people with visual impairment
- tabs allow for indenting heredocs in bash
- tabs are the default for the tool shfmt

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
Ralph Sennhauser 2024-08-25 11:55:44 +02:00
parent c763c010b8
commit abdda50892
16 changed files with 788 additions and 816 deletions

View File

@ -61,7 +61,6 @@ fi
popd
if [ "$build_toolchain" = "true" ]; then
rm -r $TOOLCHAIN || true

View File

@ -17,7 +17,10 @@ for APPDIR in ../workspaces/gcc/obj/*; do
fi
done
(cd ../../binaries/system/; ./test_dbg)
(
cd ../../binaries/system/
./test_dbg
)
for APPDIR in ../workspaces/gcc/obj/*; do
lcov -d "$APPDIR" -b ../workspaces/gcc --capture -o temp.info &&
@ -30,4 +33,7 @@ lcov -r app.info '*/third_party/*' -o app.info
rm -rf output
mkdir output
(cd output; genhtml ../app.info)
(
cd output
genhtml ../app.info
)

View File

@ -0,0 +1 @@
premake-5-alpha-14+wildfiregames.1

View File

@ -3,8 +3,7 @@ set -e
LIB_VERSION="premake-5-alpha-14+wildfiregames.1"
if [ -e .already-built ] && [ "$(cat .already-built)" = "${LIB_VERSION}" ]
then
if [ -e .already-built ] && [ "$(cat .already-built)" = "${LIB_VERSION}" ]; then
echo "Premake 5 is already up to date."
exit
fi

View File

@ -35,8 +35,7 @@ enable_atlas=true
JOBS=${JOBS:="-j2"}
for i in "$@"
do
for i in "$@"; do
case $i in
--with-system-premake5) with_system_premake5=true ;;
--enable-atlas) enable_atlas=true ;;
@ -56,8 +55,7 @@ if [ "$enable_atlas" = "true" ]; then
export WX_CONFIG="${WX_CONFIG:="wx-config"}"
fi
if [ ! -x "$(command -v $WX_CONFIG)" ]
then
if [ ! -x "$(command -v $WX_CONFIG)" ]; then
echo 'WX_CONFIG must be set and valid or wx-config must be present when --atlas is passed as argument.'
exit 1
fi

View File

@ -100,7 +100,7 @@ ARCHLESS_LDFLAGS="$LDFLAGS -stdlib=libc++"
# If ARCH isn't set, select either x86_64 or arm64
if [ -z "${ARCH}" ]; then
ARCH=`uname -m`
ARCH=$(uname -m)
fi
if [ $ARCH == "arm64" ]; then
# Some libs want this passed to configure for cross compilation.
@ -146,15 +146,14 @@ already_built()
}
# Check that we're actually on macOS
if [ "`uname -s`" != "Darwin" ]; then
if [ "$(uname -s)" != "Darwin" ]; then
die "This script is intended for macOS only"
fi
# Parse command-line options:
force_rebuild=false
for i in "$@"
do
for i in "$@"; do
case $i in
--force-rebuild) force_rebuild=true ;;
-j*) JOBS=$i ;;
@ -165,10 +164,9 @@ cd "$(dirname $0)" # Now in libraries/ (where we assume this script resides)
mkdir -p macos
cd macos
# Create a location to create copies of dependencies' *.pc files, so they can be found by pkg-config
PC_PATH="$(pwd)/pkgconfig/"
if [[ "$force_rebuild" = "true" ]]; then
if [[ $force_rebuild == "true" ]]; then
rm -rf $PC_PATH
fi
mkdir -p $PC_PATH
@ -186,8 +184,7 @@ pushd zlib > /dev/null
ZLIB_DIR="$(pwd)"
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
then
if [[ $force_rebuild == "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]; then
rm -f .already-built
download_lib $LIB_URL $LIB_ARCHIVE
@ -196,11 +193,11 @@ then
pushd $LIB_DIRECTORY
# patch zlib's configure script to use our CFLAGS and LDFLAGS
(patch -Np0 -i ../../../macos-patches/zlib_flags.diff \
&& CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \
(patch -Np0 -i ../../../macos-patches/zlib_flags.diff &&
CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \
./configure --prefix="$ZLIB_DIR" \
--static \
&& make ${JOBS} && make install) || die "zlib build failed"
--static &&
make ${JOBS} && make install) || die "zlib build failed"
popd
cp -f lib/pkgconfig/* $PC_PATH
@ -221,8 +218,7 @@ LIB_URL="http://curl.haxx.se/download/"
mkdir -p libcurl
pushd libcurl >/dev/null
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
then
if [[ $force_rebuild == "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]; then
INSTALL_DIR="$(pwd)"
rm -f .already-built
@ -258,8 +254,8 @@ then
--disable-ldaps \
--without-libidn2 \
--with-zlib="${ZLIB_DIR}" \
--enable-shared=no \
&& make ${JOBS} && make install) || die "libcurl build failed"
--enable-shared=no &&
make ${JOBS} && make install) || die "libcurl build failed"
popd
cp -f lib/pkgconfig/* $PC_PATH
@ -282,8 +278,7 @@ pushd iconv > /dev/null
ICONV_DIR="$(pwd)"
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
then
if [[ $force_rebuild == "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]; then
rm -f .already-built
download_lib $LIB_URL $LIB_ARCHIVE
@ -297,8 +292,8 @@ then
--without-libiconv-prefix \
--without-libintl-prefix \
--disable-nls \
--enable-shared=no \
&& make ${JOBS} && make install) || die "libiconv build failed"
--enable-shared=no &&
make ${JOBS} && make install) || die "libiconv build failed"
popd
echo "$LIB_VERSION" >.already-built
else
@ -317,8 +312,7 @@ LIB_URL="ftp://xmlsoft.org/libxml2/"
mkdir -p libxml2
pushd libxml2 >/dev/null
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
then
if [[ $force_rebuild == "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]; then
INSTALL_DIR="$(pwd)"
rm -f .already-built
@ -335,8 +329,8 @@ then
--without-python \
--with-iconv="${ICONV_DIR}" \
--with-zlib="${ZLIB_DIR}" \
--enable-shared=no \
&& make ${JOBS} && make install) || die "libxml2 build failed"
--enable-shared=no &&
make ${JOBS} && make install) || die "libxml2 build failed"
popd
cp -f lib/pkgconfig/* $PC_PATH
@ -358,8 +352,7 @@ LIB_URL="https://libsdl.org/release/"
mkdir -p sdl2
pushd sdl2 >/dev/null
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
then
if [[ $force_rebuild == "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]; then
INSTALL_DIR="$(pwd)"
rm -f .already-built
@ -379,8 +372,8 @@ then
--disable-video-x11 \
--without-x \
--enable-video-cocoa \
--enable-shared=no \
&& make $JOBS && make install) || die "SDL2 build failed"
--enable-shared=no &&
make $JOBS && make install) || die "SDL2 build failed"
popd
cp -f lib/pkgconfig/* $PC_PATH
@ -401,8 +394,7 @@ LIB_URL="https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/"
mkdir -p boost
pushd boost >/dev/null
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
then
if [[ $force_rebuild == "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]; then
INSTALL_DIR="$(pwd)"
rm -f .already-built
@ -413,9 +405,10 @@ then
pushd $LIB_DIRECTORY
# Can't use macosx-version, see above comment.
(./bootstrap.sh --with-libraries=filesystem,system \
--prefix=$INSTALL_DIR \
&& ./b2 cflags="$CFLAGS" \
(
./bootstrap.sh --with-libraries=filesystem,system \
--prefix=$INSTALL_DIR &&
./b2 cflags="$CFLAGS" \
toolset=clang \
cxxflags="$CXXFLAGS" \
linkflags="$LDFLAGS" ${JOBS} \
@ -424,7 +417,7 @@ then
--debug-configuration \
link=static \
threading=multi \
variant=release install \
variant=release install
) || die "Boost build failed"
popd
@ -446,8 +439,7 @@ LIB_URL="http://github.com/wxWidgets/wxWidgets/releases/download/v3.1.4/"
mkdir -p wxwidgets
pushd wxwidgets >/dev/null
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
then
if [[ $force_rebuild == "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]; then
INSTALL_DIR="$(pwd)"
rm -f .already-built
@ -486,8 +478,8 @@ then
(../configure CFLAGS="$ARCHLESS_CFLAGS" \
CXXFLAGS="$ARCHLESS_CXXFLAGS" \
CPPFLAGS="-D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=1" \
LDFLAGS="$ARCHLESS_LDFLAGS" $CONF_OPTS \
&& make ${JOBS} && make install) || die "wxWidgets build failed"
LDFLAGS="$ARCHLESS_LDFLAGS" $CONF_OPTS &&
make ${JOBS} && make install) || die "wxWidgets build failed"
popd
popd
echo "$LIB_VERSION" >.already-built
@ -507,8 +499,7 @@ LIB_URL="http://download.sourceforge.net/libpng/"
mkdir -p libpng
pushd libpng >/dev/null
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
then
if [[ $force_rebuild == "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]; then
INSTALL_DIR="$(pwd)"
rm -f .already-built
@ -522,8 +513,8 @@ then
(./configure CFLAGS="$CFLAGS" CPPFLAGS=" -I $ZLIB_DIR/include " \
LDFLAGS="$LDFLAGS -L$ZLIB_DIR/lib" \
--prefix=$INSTALL_DIR \
--enable-shared=no \
&& make ${JOBS} && make install) || die "libpng build failed"
--enable-shared=no &&
make ${JOBS} && make install) || die "libpng build failed"
popd
cp -f lib/pkgconfig/* $PC_PATH
@ -544,8 +535,7 @@ LIB_URL="https://download.savannah.gnu.org/releases/freetype/"
mkdir -p freetype
pushd freetype >/dev/null
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
then
if [[ $force_rebuild == "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]; then
INSTALL_DIR="$(pwd)"
rm -f .already-built
@ -561,8 +551,8 @@ then
--enable-shared=no \
--with-harfbuzz=no \
--with-bzip2=no \
--with-brotli=no \
&& make ${JOBS} && make install) || die "freetype build failed"
--with-brotli=no &&
make ${JOBS} && make install) || die "freetype build failed"
popd
cp -f lib/pkgconfig/* $PC_PATH
echo "$LIB_VERSION" >.already-built
@ -584,8 +574,7 @@ mkdir -p libogg
pushd libogg >/dev/null
OGG_DIR="$(pwd)"
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
then
if [[ $force_rebuild == "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]; then
rm -f .already-built
download_lib $LIB_URL $LIB_ARCHIVE
@ -596,8 +585,8 @@ then
(./configure CFLAGS="$CFLAGS" \
LDFLAGS="$LDFLAGS" \
--prefix=$OGG_DIR \
--enable-shared=no \
&& make ${JOBS} && make install) || die "libogg build failed"
--enable-shared=no &&
make ${JOBS} && make install) || die "libogg build failed"
popd
cp -f lib/pkgconfig/* $PC_PATH
@ -618,8 +607,7 @@ LIB_URL="http://downloads.xiph.org/releases/vorbis/"
mkdir -p vorbis
pushd vorbis >/dev/null
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
then
if [[ $force_rebuild == "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]; then
INSTALL_DIR="$(pwd)"
rm -f .already-built
@ -633,8 +621,8 @@ then
LDFLAGS="$LDFLAGS" \
--prefix="$INSTALL_DIR" \
--enable-shared=no \
--with-ogg="$OGG_DIR" \
&& make ${JOBS} && make install) || die "libvorbis build failed"
--with-ogg="$OGG_DIR" &&
make ${JOBS} && make install) || die "libvorbis build failed"
popd
cp -f lib/pkgconfig/* $PC_PATH
@ -657,8 +645,7 @@ pushd gmp > /dev/null
GMP_DIR="$(pwd)"
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
then
if [[ $force_rebuild == "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]; then
INSTALL_DIR="$(pwd)"
rm -f .already-built
@ -677,8 +664,8 @@ then
--prefix="$INSTALL_DIR" \
--enable-fat \
--disable-shared \
--with-pic \
&& make ${JOBS} && make install) || die "GMP build failed"
--with-pic &&
make ${JOBS} && make install) || die "GMP build failed"
popd
cp -f lib/pkgconfig/* $PC_PATH
@ -702,8 +689,7 @@ pushd nettle > /dev/null
NETTLE_DIR="$(pwd)"
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
then
if [[ $force_rebuild == "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]; then
INSTALL_DIR="$(pwd)"
rm -f .already-built
@ -725,8 +711,8 @@ then
--disable-shared \
--disable-documentation \
--disable-openssl \
--disable-assembler \
&& make ${JOBS} && make install) || die "Nettle build failed"
--disable-assembler &&
make ${JOBS} && make install) || die "Nettle build failed"
popd
cp -f lib/pkgconfig/* $PC_PATH
@ -749,8 +735,7 @@ pushd gnutls > /dev/null
GNUTLS_DIR="$(pwd)"
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
then
if [[ $force_rebuild == "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]; then
INSTALL_DIR="$(pwd)"
rm -f .already-built
@ -762,8 +747,8 @@ then
# Patch GNUTLS for a linking issue with isdigit
# Patch by Ross Nicholson: https://gitlab.com/gnutls/gnutls/-/issues/1033#note_379529145
(patch -Np1 -i ../../../macos-patches/03-undo-libtasn1-cisdigit.patch \
&& ./configure CFLAGS="$CFLAGS" \
(patch -Np1 -i ../../../macos-patches/03-undo-libtasn1-cisdigit.patch &&
./configure CFLAGS="$CFLAGS" \
CXXFLAGS="$CXXFLAGS" \
LDFLAGS="$LDFLAGS" \
LIBS="-L${GMP_DIR}/lib -lgmp" \
@ -784,8 +769,8 @@ then
--disable-guile \
--disable-doc \
--disable-tools \
--disable-nls \
&& make ${JOBS} LDFLAGS= install) || die "GnuTLS build failed"
--disable-nls &&
make ${JOBS} LDFLAGS= install) || die "GnuTLS build failed"
popd
cp -f lib/pkgconfig/* $PC_PATH
@ -806,8 +791,7 @@ LIB_URL="http://camaya.net/download/"
mkdir -p gloox
pushd gloox >/dev/null
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
then
if [[ $force_rebuild == "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]; then
INSTALL_DIR="$(pwd)"
rm -f .already-built
@ -832,8 +816,8 @@ then
--without-openssl \
--without-tests \
--without-examples \
--disable-getaddrinfo \
&& make ${JOBS} && make install) || die "gloox build failed"
--disable-getaddrinfo &&
make ${JOBS} && make install) || die "gloox build failed"
popd
cp -f lib/pkgconfig/* $PC_PATH
@ -854,8 +838,7 @@ LIB_URL="https://github.com/unicode-org/icu/releases/download/release-69-1/"
mkdir -p icu
pushd icu >/dev/null
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
then
if [[ $force_rebuild == "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]; then
INSTALL_DIR="$(pwd)"
rm -f .already-built
@ -877,8 +860,8 @@ then
--disable-samples \
--enable-extras \
--enable-icuio \
--enable-tools \
&& make ${JOBS} && make install) || die "ICU build failed"
--enable-tools &&
make ${JOBS} && make install) || die "ICU build failed"
popd
popd
@ -900,8 +883,7 @@ LIB_URL="http://enet.bespin.org/download/"
mkdir -p enet
pushd enet >/dev/null
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
then
if [[ $force_rebuild == "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]; then
INSTALL_DIR="$(pwd)"
rm -f .already-built
@ -914,8 +896,8 @@ then
(./configure CFLAGS="$CFLAGS" \
LDFLAGS="$LDFLAGS" \
--prefix=${INSTALL_DIR} \
--enable-shared=no \
&& make clean && make ${JOBS} && make install) || die "ENet build failed"
--enable-shared=no &&
make clean && make ${JOBS} && make install) || die "ENet build failed"
popd
cp -f lib/pkgconfig/* $PC_PATH
@ -936,8 +918,7 @@ LIB_URL="http://miniupnp.tuxfamily.org/files/download.php?file="
mkdir -p miniupnpc
pushd miniupnpc >/dev/null
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
then
if [[ $force_rebuild == "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]; then
INSTALL_DIR="$(pwd)"
rm -f .already-built
@ -947,9 +928,10 @@ then
tar -xf $LIB_ARCHIVE
pushd $LIB_DIRECTORY
(make clean \
&& CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS make ${JOBS} \
&& INSTALLPREFIX="$INSTALL_DIR" make install \
(
make clean &&
CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS make ${JOBS} &&
INSTALLPREFIX="$INSTALL_DIR" make install
) || die "MiniUPnPc build failed"
popd
@ -973,8 +955,7 @@ LIB_URL="https://download.libsodium.org/libsodium/releases/"
mkdir -p libsodium
pushd libsodium >/dev/null
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
then
if [[ $force_rebuild == "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]; then
INSTALL_DIR="$(pwd)"
rm -f .already-built
@ -984,14 +965,15 @@ then
tar -xf $LIB_ARCHIVE
pushd $LIB_DIRECTORY
(./configure CFLAGS="$CFLAGS" \
(
./configure CFLAGS="$CFLAGS" \
LDFLAGS="$LDFLAGS" \
--prefix=${INSTALL_DIR} \
--enable-shared=no \
&& make clean \
&& CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS make ${JOBS} \
&& make check \
&& INSTALLPREFIX="$INSTALL_DIR" make install \
--enable-shared=no &&
make clean &&
CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS make ${JOBS} &&
make check &&
INSTALLPREFIX="$INSTALL_DIR" make install
) || die "libsodium build failed"
popd
@ -1012,8 +994,7 @@ LIB_URL="https://github.com/fmtlib/fmt/archive/"
mkdir -p fmt
pushd fmt >/dev/null
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$FMT_VERSION" ]]
then
if [[ $force_rebuild == "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$FMT_VERSION" ]]; then
INSTALL_DIR="$(pwd)"
rm -f .already-built
@ -1033,8 +1014,8 @@ then
-DFMT_TEST=False \
-DFMT_DOC=False \
-DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" \
$CMAKE_FLAGS \
&& make fmt ${JOBS} && make install) || die "fmt build failed"
$CMAKE_FLAGS &&
make fmt ${JOBS} && make install) || die "fmt build failed"
popd
popd
@ -1053,8 +1034,7 @@ LIB_URL="https://releases.wildfiregames.com/libs/"
mkdir -p "molten-vk"
pushd "molten-vk" >/dev/null
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$MOLTENVK_VERSION" ]] || [[ ! -e ../../../binaries/system/libMoltenVK.dylib ]]
then
if [[ $force_rebuild == "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$MOLTENVK_VERSION" ]] || [[ ! -e ../../../binaries/system/libMoltenVK.dylib ]]; then
INSTALL_DIR="../../../../binaries/system/"
rm -f .already-built
download_lib $LIB_URL $LIB_ARCHIVE
@ -1089,8 +1069,7 @@ fi
# SpiderMonkey - bundled, no download
pushd ../source/spidermonkey/ >/dev/null
if [[ "$force_rebuild" = "true" ]]
then
if [[ $force_rebuild == "true" ]]; then
rm -f .already-built
fi
@ -1104,8 +1083,7 @@ popd > /dev/null
# NVTT - bundled, no download
pushd ../source/nvtt >/dev/null
if [[ "$force_rebuild" = "true" ]]
then
if [[ $force_rebuild == "true" ]]; then
rm -f .already-built
fi
@ -1118,8 +1096,7 @@ popd > /dev/null
# FCollada - bundled, no download
pushd ../source/fcollada/ >/dev/null
if [[ "$force_rebuild" = "true" ]]
then
if [[ $force_rebuild == "true" ]]; then
rm -f .already-built
fi

View File

@ -10,7 +10,7 @@ die()
# Update this line when you commit an update to source-libs
source_svnrev="28207"
if [ "`uname -s`" = "Darwin" ]; then
if [ "$(uname -s)" = "Darwin" ]; then
echo 'This script should not be used on macOS: use build-macos-libs.sh instead.'
exit 1
fi
@ -21,13 +21,13 @@ cd "$(dirname $0)"
# Check for whitespace in absolute path; this will cause problems in the
# SpiderMonkey build and maybe elsewhere, so we just forbid it
# Use perl as an alternative to readlink -f, which isn't available on BSD
SCRIPTPATH=`perl -MCwd -e 'print Cwd::abs_path shift' "$0"`
SCRIPTPATH=$(perl -MCwd -e 'print Cwd::abs_path shift' "$0")
case "$SCRIPTPATH" in
*\ *)
die "Absolute path contains whitespace, which will break the build - move the game to a path without spaces" ;;
die "Absolute path contains whitespace, which will break the build - move the game to a path without spaces"
;;
esac
# Parse command-line options (download options and build options):
source_libs_dir="source"
@ -37,8 +37,7 @@ with_system_mozjs=false
JOBS=${JOBS:="-j2"}
for i in "$@"
do
for i in "$@"; do
case $i in
--source-libs-dir=*) source_libs_dir=${1#*=} ;;
--source-libs-dir) die "correct syntax is --source-libs-dir=/path/to/dir" ;;
@ -64,7 +63,7 @@ echo
# Some of our makefiles depend on GNU make, so we set some sane defaults if MAKE
# is not set.
case "`uname -s`" in
case "$(uname -s)" in
"FreeBSD" | "OpenBSD")
MAKE=${MAKE:="gmake"}
;;

View File

@ -31,8 +31,7 @@ ONLY_MOD="${ONLY_MOD:=false}"
if [ "${ONLY_MOD}" = true ]; then
archives="mod"
else
for modname in [a-zA-Z0-9]*
do
for modname in [a-zA-Z0-9]*; do
archives="${archives} ${modname}"
done
fi
@ -53,19 +52,16 @@ if [ "${BUILD_SHADERS}" = true ]; then
ENGINE_VERSION=${ENGINE_VERSION:="0.0.xx"}
rulesFile="rules.${ENGINE_VERSION}.json"
if [ ! -e "$rulesFile" ]
then
if [ ! -e "$rulesFile" ]; then
# The rules.json file should be present in release tarballs, for
# some Linux CIs don't have access to the internet.
download="$(command -v wget || echo "curl -sLo ""${rulesFile}""")"
$download "https://releases.wildfiregames.com/spir-v/$rulesFile"
fi
for modname in $archives
do
for modname in $archives; do
modLocation="../../../binaries/data/mods/${modname}"
if [ -e "${modLocation}/shaders/spirv/" ]
then
if [ -e "${modLocation}/shaders/spirv/" ]; then
echo "Removing existing spirv shaders for '${modname}'..."
rm -rf "${modLocation}/shaders/spirv"
fi
@ -75,8 +71,7 @@ if [ "${BUILD_SHADERS}" = true ]; then
popd >/dev/null
fi
for modname in $archives
do
for modname in $archives; do
echo "Building archive for '${modname}'..."
ARCHIVEBUILD_INPUT="binaries/data/mods/${modname}"
ARCHIVEBUILD_OUTPUT="archives/${modname}"

View File

@ -18,7 +18,7 @@ die()
}
# Check that we're actually on OS X
if [ "`uname -s`" != "Darwin" ]; then
if [ "$(uname -s)" != "Darwin" ]; then
die "This script is intended for OS X only"
fi

View File

@ -8,4 +8,3 @@ fi
input_directory=$1
# perform work
find $input_directory -name \*.xml -exec xsltproc -o {} templatessorter.xsl {} \;

View File

@ -13,8 +13,7 @@ export TLDIR="$(dirname $(realpath $0))"
# Use semicolons to separate values on Windows.
# If that produces bogus output, you can try with commas instead.
if [ "${OS}" = "Windows_NT" ]
then
if [ "${OS}" = "Windows_NT" ]; then
export TLLOG="Default;IonCompiler"
export TLOPTIONS="EnableMainThread;EnableOffThread;EnableGraph"
else