Created
March 11, 2017 20:44
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -u | |
set -e | |
set -x | |
# Check if the GameData folder has been provided | |
if [ "$1" == "" ]; then | |
echo "Provide the path to the Gamedata folder as first parameter" | |
exit 1 | |
fi | |
if [ ! -d "$1" ]; then | |
echo "The provided path to the GameData ($1) folder is invalid" | |
exit 1 | |
fi | |
GAMEDATA_FOLDER_PATH="$1" | |
# Installing dependencies | |
brew install zlib libjpeg libpng sdl2 --universal | |
# Cloning OpenJK | |
git clone https://github.com/JACoders/OpenJK.git | |
pushd OpenJK | |
# Create a build folder and init the project | |
mkdir build | |
pushd build | |
# Configure the project using CMAKE | |
cmake -D CMAKE_INSTALL_PREFIX=$GAMEDATA_FOLDER_PATH .. | |
# Compile the project | |
make | |
# Build the project | |
make install | |
popd # Leave OpenJK/build | |
popd # Leave OpenJK | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment