2019-06-15 23:02:44 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-12-19 19:20:57 +00:00
|
|
|
# Catch ctrl-c to exit script - otherwise, loop just runs again
|
|
|
|
trap ctrl_c INT
|
|
|
|
function ctrl_c() {
|
|
|
|
echo "Exiting..."
|
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
|
|
|
|
# Clear out any old rootfs copies
|
2019-11-26 01:25:15 +00:00
|
|
|
rm -rf $(dirname $0)/out/rootfs_*
|
|
|
|
|
2020-10-29 22:22:15 +00:00
|
|
|
# Did not work well on Linux.... works on OSX :-/
|
|
|
|
#fswatch -o $(dirname $0)/rootfs $(dirname $0)/CHANGELOG | (while read; do $(dirname $0)/make_rootfs.sh; echo "Update rootfs!"; done)
|
2019-06-15 23:02:44 +00:00
|
|
|
|
2020-10-29 22:22:15 +00:00
|
|
|
while true; do find $(dirname $0)/rootfs/ | entr -d -s $(dirname $0)/make_rootfs.sh; done
|