Skip to content

Instantly share code, notes, and snippets.

Marek Bernat mbernat

Block or report user

Report or block mbernat

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
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.