I am attempting to use the 'entr' command to automatically compile Groff documents.
I wish to run the following line:
refer references.bib $1 | groff -ms $1 -T pdf > $2
Sadly it will only compile once if I try this:
echo $1 | entr refer references.bib $1 | groff -ms $1 -T pdf > $2
I have also tried the following, but it creates an infinite loop that cant be exited with Ctrl+C:
compile(){
refer references.bib $1 | groff -ms $1 -T pdf > $2
}
while true; do
compile $1 $2
echo $1 | entr -pd -s 'kill $PPID'
done
What is the correct way of doing this?