xrsh-buildroot/buildroot-v86/board/v86/rootfs_overlay/root/bin/watchfs

10 lines
300 B
Bash
Executable File

#!/bin/sh
infinite inotifyd echo /root | awk '
# listen for writes to rootdir and send them to DOM
/^[wne] \/root index\.html/ { system("cat "$2"/"$3" | grep -vE \"^#!\" > /dev/browser/html") }
/^[wne] \/root index\.js/ { system("cat "$2"/"$3" | grep -vE \"^#!\" > /dev/browser/js") }
'