diff options
| author | Luke Smith <luke@lukesmith.xyz> | 2022-08-19 14:40:31 -0400 |
|---|---|---|
| committer | Luke Smith <luke@lukesmith.xyz> | 2022-08-19 14:40:31 -0400 |
| commit | cf0918452fe5fdc30793695b17e447e55b55a6fa (patch) | |
| tree | b7569c69c92859ad7c5ef455222dfd2f88ae9eb8 /.local/bin/compiler | |
| parent | 03bcbdb2efa8dbe0a0f7f198d58d3e3896618eb0 (diff) | |
| parent | b82b091d96447860decae6d8495d036b4abddaa0 (diff) | |
| download | eibhear-cf0918452fe5fdc30793695b17e447e55b55a6fa.tar.gz eibhear-cf0918452fe5fdc30793695b17e447e55b55a6fa.tar.zst eibhear-cf0918452fe5fdc30793695b17e447e55b55a6fa.zip | |
Merge branch 'ssnailed-patch-2'
Diffstat (limited to '.local/bin/compiler')
| -rwxr-xr-x | .local/bin/compiler | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/.local/bin/compiler b/.local/bin/compiler index 67992be..6e28cd0 100755 --- a/.local/bin/compiler +++ b/.local/bin/compiler @@ -17,13 +17,15 @@ ext="${file##*.}" cd "$dir" || exit 1 textype() { \ + textarget="$(getcomproot "$file" || echo "$file")" + echo "$textarget" command="pdflatex" - ( head -n5 "$file" | grep -qi 'xelatex' ) && command="xelatex" - $command --output-directory="$dir" "$base" && - grep -qi addbibresource "$file" && - biber --input-directory "$dir" "$base" && - $command --output-directory="$dir" "$base" && - $command --output-directory="$dir" "$base" + ( head -n5 "$textarget" | grep -qi 'xelatex' ) && command="xelatex" + $command --output-directory="${textarget%/*}" "${textarget%.*}" + grep -qi addbibresource "$textarget" && + biber --input-directory "${textarget%/*}" "${textarget%.*}" && + $command --output-directory="${textarget%/*}" "${textarget%.*}" && + $command --output-directory="${textarget%/*}" "${textarget%.*}" } case "$ext" in |
