From 82df70eff06e7b44ee84283070d7f801f7fc1d92 Mon Sep 17 00:00:00 2001 From: Sam Chudnick Date: Sat, 6 Nov 2021 20:25:45 -0400 Subject: initial commit --- .local/bin/compile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 .local/bin/compile (limited to '.local/bin/compile') diff --git a/.local/bin/compile b/.local/bin/compile new file mode 100755 index 0000000..837766b --- /dev/null +++ b/.local/bin/compile @@ -0,0 +1,14 @@ +#!/bin/sh + +# Script for automatic compilation (or interpretation) of various file types +# The filename needs to be passed to this script as the only argument +file="$1" +base="${file%.*}" +ext="${file##*.}" + +case $ext in + mom) groff -mom -Tpdf "$file" > "$base.pdf" ;; + ms) groff -me -Tpdf "$file" > "$base.pdf" ;; + me) groff -me -Tpdf "$file" > "$base.pdf" ;; + py) python3 "$file" ;; +esac -- cgit v1.2.3