#!/bin/bash if [[ ! -d "./build" ]]; then mkdir build fi if [[ $1 == "--setup" ]]; then git submodule update --init pushd "./external/raylib/" cmake -S . -B build -DBUILD_EXAMPLES=Off cmake --build build popd fi pushd "./build" gcc -g "../example1.c" -o "example1" -I"../external/raylib/build/raylib/include/" -L"../external/raylib/build/raylib/" -lraylib -lGL -lm -lpthread -ldl -lrt -lX11 if [[ $1 == "--run" ]] && [[ $? == 0 ]]; then ./example1 fi popd