Skip to content

Instantly share code, notes, and snippets.

@W95Psp
Last active May 17, 2020 12:18
Show Gist options
  • Save W95Psp/0e380d56f207bf1df7a3b7b83a531bbe to your computer and use it in GitHub Desktop.
Save W95Psp/0e380d56f207bf1df7a3b7b83a531bbe to your computer and use it in GitHub Desktop.
Bash command that spots missing LaTeX packages, and re-compile on default.nix changes
inotifywait -r -m -e modify default.nix | \
while read x; do (
nix-build 2>&1 | tee >(
grep -Po "File .\K.*(?=.sty' not found)" | \
tee >(tr -d '\n' | xsel -i -b)
)
); done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment