6arelyFuture 1c073d9682
All checks were successful
link / Link assets on Linux (push) Successful in 5m44s
build: suppress output for apt
2024-06-10 18:50:49 +00:00

48 lines
1.6 KiB
Bash
Executable File

#!/bin/bash
set -e
# Validate OAT version
if [[ -z "$OAT_VERSION" ]]; then
echo "No OAT version was specified, please set the OAT_VERSION environment variable."
exit 1
fi
# Make sure we have cURL (and file for debugging)
echo "Downloading dependencies"
dpkg --add-architecture i386
apt-get update > /dev/null 2>&1
apt-get install -y curl file libstdc++-13-dev:i386 > /dev/null 2>&1
# Construct the download URL
DOWNLOAD_URL="https://github.com/Laupetin/OpenAssetTools/releases/download/v${OAT_VERSION}/oat-linux.tar.gz"
echo "Downloading OAT from: $DOWNLOAD_URL"
# Define temporary directory
TEMP_DIR="/tmp/oat_download"
# Create temporary directory if it doesn't exist
mkdir -p "$TEMP_DIR"
# Download the tar.gz file to the temporary directory
curl -L -o "${TEMP_DIR}/oat-linux.tar.gz" "$DOWNLOAD_URL"
# Extract the contents of the tar.gz file
tar -xzf "${TEMP_DIR}/oat-linux.tar.gz" -C "${TEMP_DIR}"
# Copy the executables to /usr/local/bin and make them executable
cp "${TEMP_DIR}/Linker" "${TEMP_DIR}/Unlinker" /usr/local/bin/
chmod +x /usr/local/bin/Linker /usr/local/bin/Unlinker
# Clean up temporary directory
rm -rf "$TEMP_DIR"
echo "OpenAssetTools version $OAT_VERSION has been installed."
Linker -v --load "./deps/iw5-zones/zone/english/code_post_gfx_mp.ff" --menu-permissive --menu-no-optimization code_post_gfx_mp
Linker -v --load "./deps/iw5-zones/zone/english/code_post_gfx.ff" --menu-permissive --menu-no-optimization code_post_gfx
Linker -v --load "./deps/iw5-zones/zone/english/localized_ui_mp.ff" --menu-permissive --menu-no-optimization localized_ui_mp