#! /bin/bash CACHE=/tmp/fggl/ LOG=$CACHE/demo.log EXE="../builds/cli/demo/FgglDemo" # check build directory exists if [[ ! -d "builds/cli/" ]] then mkdir -p builds/cli fi # check cmake exists if [ ! -x "$(command -v cmake)" ]; then sudo dnf install -y cmake extra-cmake-modules sudo dnf install -y wayland-devel libxkbcommon-devel wayland-protocols-devel sudo dnf install -y glew-devel glm-devel fi # if doing shader development, disable the cache to make sure changes take affect rm -rf $CACHE # # build step # pushd builds/cli cmake ../.. if [ $? -ne 0 ] then echo "[!] Cmake failed" exit 1 fi make if [ $? -ne 0 ] then echo "[!] make failed" exit 1 fi popd # # additional stuff # EXE="gdb $EXE" # gamemoderun if [ -x "$(command -v gamemoderun)" ]; then EXE="gamemoderun $EXE" fi # mangohud if [ -x "$(command -v mangohud)" ]; then EXE="mangohud --dlsym $EXE" fi pushd demo $EXE popd