Created
January 15, 2019 14:14
-
-
Save raghavkarol/c47d9e7b300203a5840cb0e3280a3855 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
set -euo pipefail | |
readonly dot_file="$1" | |
readonly output_file="$2" | |
readonly dot_file_abs=$(readlink -f $dot_file) | |
if [ ! -f $dot_file_abs ] | |
then | |
echo "$dot_file is not a file" | |
exit 1 | |
fi | |
echo "$(date) start watch compile reload for $dot_file" | |
watchmedo shell-command \ | |
--patterns '*.dot' \ | |
--command \ | |
"echo \$(date) compiling \${watch_src_path}; dot2html_with_svg $dot_file $output_file" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment