Skip to content

Instantly share code, notes, and snippets.

@elPytel
Created November 12, 2022 13:53
Show Gist options
  • Save elPytel/a755a06caf267a6d7b66814713f2d3b9 to your computer and use it in GitHub Desktop.
Save elPytel/a755a06caf267a6d7b66814713f2d3b9 to your computer and use it in GitHub Desktop.
Script for auto-runing file on change.
#!/bin/bash
if [[ $# -eq 0 ]]; then
echo -e "$ERROR$: no file is specified!"
exit 1
fi
file="$1"
chmod +x $file &&
echo $file | entr -c ./$file; echo ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment