added compiler related script from voidrice
This commit is contained in:
parent
fe81858e09
commit
7cb8c4bc28
12
scripts/getcomproot
Executable file
12
scripts/getcomproot
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# A helper script for LaTeX/groff files used by `compiler` and `opout`.
|
||||||
|
# The user can add the root file of a larger project as a comment as below:
|
||||||
|
# % root = mainfile.tex
|
||||||
|
# And the compiler script will run on that instead of the opened file.
|
||||||
|
|
||||||
|
texroot="$(grep -i "^.\+\s*root\s*=\s*\S\+" "$1")"
|
||||||
|
texroot="${texroot##*=}"
|
||||||
|
texroot="${texroot//[\"\' ]}"
|
||||||
|
|
||||||
|
[ -f "$texroot" ] && readlink -f "$texroot" || exit 1
|
||||||
Reference in New Issue
Block a user