Remove redundant OS_NAME_PATH variable

This variable was simply assigned the same value as the `OS_NAME` variable.
This commit is contained in:
Robert Müller 2024-05-11 17:57:13 +02:00
parent 0da30b7857
commit 2844ad7239

View file

@ -20,16 +20,6 @@ if [[ "${OS_NAME}" == "webasm" ]]; then
LINKFLAGS="-pthread -O3 -g -s USE_PTHREADS=1 -s ASYNCIFY=1 -s WASM=1"
fi
if [[ "${OS_NAME}" == "android" ]]; then
OS_NAME_PATH="android"
elif [[ "${OS_NAME}" == "windows" ]]; then
OS_NAME_PATH="windows"
elif [[ "${OS_NAME}" == "linux" ]]; then
OS_NAME_PATH="linux"
elif [[ "${OS_NAME}" == "webasm" ]]; then
OS_NAME_PATH="webasm"
fi
COMP_HAS_ARM32=0
COMP_HAS_ARM64=0
COMP_HAS_x86=0
@ -141,29 +131,29 @@ function copy_arches_for_lib() {
mkdir ddnet-libs
function _copy_curl() {
mkdir -p ddnet-libs/curl/"$OS_NAME_PATH"/lib"$2"
cp compile_libs/curl/build_"$OS_NAME"_"$1"/lib/libcurl.a ddnet-libs/curl/"$OS_NAME_PATH"/lib"$2"/libcurl.a
mkdir -p ddnet-libs/curl/"$OS_NAME"/lib"$2"
cp compile_libs/curl/build_"$OS_NAME"_"$1"/lib/libcurl.a ddnet-libs/curl/"$OS_NAME"/lib"$2"/libcurl.a
}
copy_arches_for_lib _copy_curl
mkdir ddnet-libs
function _copy_freetype2() {
mkdir -p ddnet-libs/freetype/"$OS_NAME_PATH"/lib"$2"
cp compile_libs/freetype2/build_"$OS_NAME"_"$1"/libfreetype.a ddnet-libs/freetype/"$OS_NAME_PATH"/lib"$2"/libfreetype.a
mkdir -p ddnet-libs/freetype/"$OS_NAME"/lib"$2"
cp compile_libs/freetype2/build_"$OS_NAME"_"$1"/libfreetype.a ddnet-libs/freetype/"$OS_NAME"/lib"$2"/libfreetype.a
}
copy_arches_for_lib _copy_freetype2
mkdir ddnet-libs
function _copy_sdl() {
mkdir -p ddnet-libs/sdl/"$OS_NAME_PATH"/lib"$2"
cp compile_libs/sdl/build_"$OS_NAME"_"$1"/libSDL2.a ddnet-libs/sdl/"$OS_NAME_PATH"/lib"$2"/libSDL2.a
cp compile_libs/sdl/build_"$OS_NAME"_"$1"/libSDL2main.a ddnet-libs/sdl/"$OS_NAME_PATH"/lib"$2"/libSDL2main.a
if [ ! -d "ddnet-libs/sdl/include/$OS_NAME_PATH" ]; then
mkdir -p ddnet-libs/sdl/include/"$OS_NAME_PATH"
mkdir -p ddnet-libs/sdl/"$OS_NAME"/lib"$2"
cp compile_libs/sdl/build_"$OS_NAME"_"$1"/libSDL2.a ddnet-libs/sdl/"$OS_NAME"/lib"$2"/libSDL2.a
cp compile_libs/sdl/build_"$OS_NAME"_"$1"/libSDL2main.a ddnet-libs/sdl/"$OS_NAME"/lib"$2"/libSDL2main.a
if [ ! -d "ddnet-libs/sdl/include/$OS_NAME" ]; then
mkdir -p ddnet-libs/sdl/include/"$OS_NAME"
fi
cp -R compile_libs/sdl/include/* ddnet-libs/sdl/include/"$OS_NAME_PATH"
cp -R compile_libs/sdl/include/* ddnet-libs/sdl/include/"$OS_NAME"
}
copy_arches_for_lib _copy_sdl
@ -177,44 +167,44 @@ fi
mkdir ddnet-libs
function _copy_ogg() {
mkdir -p ddnet-libs/opus/"$OS_NAME_PATH"/lib"$2"
cp compile_libs/ogg/build_"$OS_NAME"_"$1"/libogg.a ddnet-libs/opus/"$OS_NAME_PATH"/lib"$2"/libogg.a
mkdir -p ddnet-libs/opus/"$OS_NAME"/lib"$2"
cp compile_libs/ogg/build_"$OS_NAME"_"$1"/libogg.a ddnet-libs/opus/"$OS_NAME"/lib"$2"/libogg.a
}
copy_arches_for_lib _copy_ogg
mkdir ddnet-libs
function _copy_opus() {
mkdir -p ddnet-libs/opus/"$OS_NAME_PATH"/lib"$2"
cp compile_libs/opus/build_"$OS_NAME"_"$1"/libopus.a ddnet-libs/opus/"$OS_NAME_PATH"/lib"$2"/libopus.a
mkdir -p ddnet-libs/opus/"$OS_NAME"/lib"$2"
cp compile_libs/opus/build_"$OS_NAME"_"$1"/libopus.a ddnet-libs/opus/"$OS_NAME"/lib"$2"/libopus.a
}
copy_arches_for_lib _copy_opus
mkdir ddnet-libs
function _copy_opusfile() {
mkdir -p ddnet-libs/opus/"$OS_NAME_PATH"/lib"$2"
cp compile_libs/opusfile/build_"$OS_NAME"_"$1"/libopusfile.a ddnet-libs/opus/"$OS_NAME_PATH"/lib"$2"/libopusfile.a
mkdir -p ddnet-libs/opus/"$OS_NAME"/lib"$2"
cp compile_libs/opusfile/build_"$OS_NAME"_"$1"/libopusfile.a ddnet-libs/opus/"$OS_NAME"/lib"$2"/libopusfile.a
}
copy_arches_for_lib _copy_opusfile
mkdir ddnet-libs
function _copy_sqlite3() {
mkdir -p ddnet-libs/sqlite3/"$OS_NAME_PATH"/lib"$2"
cp compile_libs/sqlite3/build_"$OS_NAME"_"$1"/sqlite3.a ddnet-libs/sqlite3/"$OS_NAME_PATH"/lib"$2"/libsqlite3.a
mkdir -p ddnet-libs/sqlite3/"$OS_NAME"/lib"$2"
cp compile_libs/sqlite3/build_"$OS_NAME"_"$1"/sqlite3.a ddnet-libs/sqlite3/"$OS_NAME"/lib"$2"/libsqlite3.a
}
copy_arches_for_lib _copy_sqlite3
mkdir ddnet-libs
function _copy_openssl() {
mkdir -p ddnet-libs/openssl/"$OS_NAME_PATH"/lib"$2"
mkdir -p ddnet-libs/openssl/"$OS_NAME"/lib"$2"
mkdir -p ddnet-libs/openssl/include
mkdir -p ddnet-libs/openssl/include/"$OS_NAME_PATH"
cp compile_libs/openssl/build_"$OS_NAME"_"$1"/libcrypto.a ddnet-libs/openssl/"$OS_NAME_PATH"/lib"$2"/libcrypto.a
cp compile_libs/openssl/build_"$OS_NAME"_"$1"/libssl.a ddnet-libs/openssl/"$OS_NAME_PATH"/lib"$2"/libssl.a
cp -R compile_libs/openssl/build_"$OS_NAME"_"$1"/include/* ddnet-libs/openssl/include/"$OS_NAME_PATH"
mkdir -p ddnet-libs/openssl/include/"$OS_NAME"
cp compile_libs/openssl/build_"$OS_NAME"_"$1"/libcrypto.a ddnet-libs/openssl/"$OS_NAME"/lib"$2"/libcrypto.a
cp compile_libs/openssl/build_"$OS_NAME"_"$1"/libssl.a ddnet-libs/openssl/"$OS_NAME"/lib"$2"/libssl.a
cp -R compile_libs/openssl/build_"$OS_NAME"_"$1"/include/* ddnet-libs/openssl/include/"$OS_NAME"
cp -R compile_libs/openssl/include/* ddnet-libs/openssl/include
}
@ -232,21 +222,21 @@ function _copy_zlib() {
cd build_"$OS_NAME"_"$1" || exit 1
find . -maxdepth 1 -iname '*.h' -print0 | while IFS= read -r -d $'\0' file; do
mkdir -p ../../../ddnet-libs/zlib/include/"$OS_NAME_PATH"/"$(dirname "$file")"
cp "$file" ../../../ddnet-libs/zlib/include/"$OS_NAME_PATH"/"$(dirname "$file")"
mkdir -p ../../../ddnet-libs/zlib/include/"$OS_NAME"/"$(dirname "$file")"
cp "$file" ../../../ddnet-libs/zlib/include/"$OS_NAME"/"$(dirname "$file")"
done
)
mkdir -p ddnet-libs/zlib/"$OS_NAME_PATH"/lib"$2"
cp compile_libs/zlib/build_"$OS_NAME"_"$1"/libz.a ddnet-libs/zlib/"$OS_NAME_PATH"/lib"$2"/libz.a
mkdir -p ddnet-libs/zlib/"$OS_NAME"/lib"$2"
cp compile_libs/zlib/build_"$OS_NAME"_"$1"/libz.a ddnet-libs/zlib/"$OS_NAME"/lib"$2"/libz.a
}
copy_arches_for_lib _copy_zlib
mkdir ddnet-libs
function _copy_png() {
mkdir -p ddnet-libs/png/"$OS_NAME_PATH"/lib"$2"
cp compile_libs/png/build_"$OS_NAME"_"$1"/libpng16.a ddnet-libs/png/"$OS_NAME_PATH"/lib"$2"/libpng16.a
mkdir -p ddnet-libs/png/"$OS_NAME"/lib"$2"
cp compile_libs/png/build_"$OS_NAME"_"$1"/libpng16.a ddnet-libs/png/"$OS_NAME"/lib"$2"/libpng16.a
}
copy_arches_for_lib _copy_png