From e7efc197a17440a9a888a08d14b7ac94076d8539 Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Fri, 26 Apr 2024 19:14:28 -0400 Subject: [PATCH] Quick hack to watch my source and rebuild. --- sfmldemo/main.cpp | 1 - sfmldemo/watch_build.sh | 12 ++++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100755 sfmldemo/watch_build.sh diff --git a/sfmldemo/main.cpp b/sfmldemo/main.cpp index 6116ee7..5549e97 100644 --- a/sfmldemo/main.cpp +++ b/sfmldemo/main.cpp @@ -8,7 +8,6 @@ #include int main() { - fmt::print("Setting up a window for you...\n"); sf::RenderWindow window(sf::VideoMode(1920, 1080), "ImGui + SFML = <3"); diff --git a/sfmldemo/watch_build.sh b/sfmldemo/watch_build.sh new file mode 100755 index 0000000..44a5516 --- /dev/null +++ b/sfmldemo/watch_build.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +set -e + +fswatch -o *.cpp | while read num +do echo ">>>>>>>>>>>>>>>>>>>>>> `date`" + if meson compile -C builddir + then + ./builddir/sfmldemo + else + echo "^^^^^^^^^^^^^^^^^^^^^ ERROR `date`" + fi +done