2019-07-03 03:59:52 +10:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
2020-06-06 01:07:10 +10:00
|
|
|
# Dependencies: findutils, entr
|
|
|
|
#
|
|
|
|
# This script will watch for source file changes and recompile-restart Mirage
|
|
|
|
# when needed. If it gets stuck restarting in loop, press CTRL-C a bunch of
|
|
|
|
# times and try again.
|
|
|
|
#
|
|
|
|
# pdb won't be usable due to entr, use https://pypi.org/project/remote-pdb/
|
|
|
|
# instead (should be present if you install requirements-dev.txt).
|
|
|
|
#
|
|
|
|
# An argument can be given to specify which QML file in src/gui to load,
|
|
|
|
# for example "Test.qml" would load "src/gui/Test.qml".
|
2019-09-01 10:17:54 +10:00
|
|
|
# If no argument is given, the default is "UI.qml".
|
|
|
|
|
2019-09-09 00:49:33 +10:00
|
|
|
make clean
|
2020-03-11 01:31:26 +11:00
|
|
|
qmake mirage.pro CONFIG+=dev && make
|
2019-08-26 05:38:42 +10:00
|
|
|
|
2019-07-26 09:20:14 +10:00
|
|
|
while true; do
|
2021-01-04 18:32:07 +11:00
|
|
|
# app already handles reloading config and theme files
|
|
|
|
find src mirage.pro \
|
|
|
|
-type f -not -path 'src/themes/*' -not -path 'src/config/*' |
|
|
|
|
|
2019-10-30 04:35:19 +11:00
|
|
|
# -name affects the first part of the WM_CLASS returned by xprop on Linux
|
2019-07-26 09:20:14 +10:00
|
|
|
entr -cdnr sh -c \
|
2020-03-11 01:31:26 +11:00
|
|
|
"qmake mirage.pro CONFIG+=dev && make && ./mirage -name dev $*"
|
2021-01-04 18:32:07 +11:00
|
|
|
|
2019-07-26 09:20:14 +10:00
|
|
|
sleep 0.2
|
|
|
|
done
|