summaryrefslogtreecommitdiffstats
path: root/.scripts/tools/compiler
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2019-05-18 00:07:32 -0400
committerLuke Smith <luke@lukesmith.xyz>2019-05-18 00:07:32 -0400
commit54920103c2843f5a3620effbccaceaee7f6885c1 (patch)
tree222aa8e75573364cd043382996f4798d94104f65 /.scripts/tools/compiler
parent18e001db07d7105ab4dc4f4f836ca0d3a516a791 (diff)
downloadeibhear-54920103c2843f5a3620effbccaceaee7f6885c1.tar.gz
eibhear-54920103c2843f5a3620effbccaceaee7f6885c1.tar.zst
eibhear-54920103c2843f5a3620effbccaceaee7f6885c1.zip
scripts moved to ~/.local/bin
Diffstat (limited to '.scripts/tools/compiler')
-rwxr-xr-x.scripts/tools/compiler37
1 files changed, 0 insertions, 37 deletions
diff --git a/.scripts/tools/compiler b/.scripts/tools/compiler
deleted file mode 100755
index 7d3bf1d..0000000
--- a/.scripts/tools/compiler
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/sh
-# This script will compile or run another finishing operation on a document. I
-# have this script run via vim.
-#
-# Compiles .tex. groff (.mom, .ms), .rmd, .md.
-# Opens .sent files as sent presentations.
-# Runs scripts based on extention or shebang
-
-file=$(readlink -f "$1")
-dir=$(dirname "$file")
-base="${file%.*}"
-
-cd "$dir" || exit
-
-textype() { \
- command="pdflatex"
- ( sed 5q "$file" | grep -i -q 'xelatex' ) && command="xelatex"
- $command --output-directory="$dir" "$base" &&
- grep -i addbibresource "$file" >/dev/null &&
- biber --input-directory "$dir" "$base" &&
- $command --output-directory="$dir" "$base" &&
- $command --output-directory="$dir" "$base"
- }
-
-case "$file" in
- *\.ms) refer -PS -e "$file" | groff -me -ms -kejpt -T pdf > "$base".pdf ;;
- *\.mom) refer -PS -e "$file" | groff -mom -kejpt -T pdf > "$base".pdf ;;
- *\.rmd) echo "require(rmarkdown); render('$file')" | R -q --vanilla ;;
- *\.tex) textype "$file" ;;
- *\.md) pandoc "$file" --pdf-engine=xelatex -o "$base".pdf ;;
- *config.h) sudo make install ;;
- *\.c) cc "$file" -o "$base" && "$base" ;;
- *\.py) python "$file" ;;
- *\.go) go run "$file" ;;
- *\.sent) setsid sent "$file" 2>/dev/null & ;;
- *) sed 1q "$file" | grep "^#!/" | sed "s/^#!//" | xargs -r -I % "$file" ;;
-esac