71 lines
1.3 KiB
Bash
Executable File
71 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
echo "Downloading dependencies"
|
|
apt-get update > /dev/null 2>&1
|
|
apt-get install -y build-essential software-properties-common > /dev/null 2>&1
|
|
|
|
# setup
|
|
mkdir build
|
|
cd build
|
|
mkdir iw4
|
|
mkdir iw5
|
|
mkdir iw5x
|
|
|
|
# IW4x
|
|
cd iw4
|
|
mkdir scripts
|
|
cd scripts
|
|
mkdir mp
|
|
cd ..
|
|
cd ..
|
|
|
|
# Plutonium
|
|
cd iw5
|
|
mkdir mp
|
|
mkdir scripts
|
|
cd scripts
|
|
mkdir mp
|
|
cd ..
|
|
cd ..
|
|
|
|
# Alterware
|
|
cd iw5x
|
|
mkdir mp
|
|
mkdir scripts
|
|
cd scripts
|
|
mkdir mp
|
|
cd ..
|
|
cd ..
|
|
|
|
# exit build dir
|
|
cd ..
|
|
|
|
# ready for release
|
|
cp iw4/scripts/mp/_jump.gsc build/iw4/scripts/mp
|
|
echo "Created release for IW4"
|
|
|
|
# replace gsc extension with c. It will make gcc very happy
|
|
mv iw5/scripts/mp/_jump.gsc iw5/scripts/mp/_jump.c
|
|
|
|
# perform macro expansion (.in extension is from a Stack Overflow post)
|
|
gcc -D_UTILITY_DEBUG -DIW5 -DCI -E "iw5/scripts/mp/_jump.c" -o _jump_plutonium.in
|
|
|
|
gcc -D_UTILITY_DEBUG -DIW5x -DCI -E "iw5/scripts/mp/_jump.c" -o _jump_alterware.in
|
|
|
|
# remove things gcc added to the file that we do not need
|
|
python3 .gitea/scripts/clean.py _jump_plutonium.in _jump_plutonium.gsc
|
|
|
|
python3 .gitea/scripts/clean.py _jump_alterware.in _jump_alterware.gsc
|
|
|
|
# ready for release
|
|
mv _jump_plutonium.gsc build/iw5/scripts/mp/_jump.gsc
|
|
|
|
mv _jump_alterware.gsc build/iw5x/scripts/mp/_jump.gsc
|
|
|
|
cp iw5/mp/perkTable.csv build/iw5/mp
|
|
cp iw5/mp/perkTable.csv build/iw5x/mp
|
|
|
|
echo "Created release for IW5"
|