Created
November 12, 2022 13:53
-
-
Save elPytel/a755a06caf267a6d7b66814713f2d3b9 to your computer and use it in GitHub Desktop.
Script for auto-runing file on change.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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