Skip to content

Instantly share code, notes, and snippets.

Avatar

Marek Bernat mbernat

View GitHub Profile
@mbernat
mbernat / watch.sh
Last active Dec 23, 2019
Automatically restart an esy binary after a rebuild
View watch.sh
#!/usr/bin/env bash
APP=$1
PID="nope"
inotifywait -q -m -e create _esy/default |
while read -r filename event; do
if [[ "$event" == "CREATE build" ]]; then
if [[ "$(ps -ao '%p' | grep ${PID})" != "" ]]; then
kill -9 ${PID}
fi
You can’t perform that action at this time.