Last active
May 17, 2022 04:43
-
-
Save tatumroaquin/2bf1d4e6dc36d4dd477bce1abf3af5d6 to your computer and use it in GitHub Desktop.
Revisions
-
muxocrypt revised this gist
May 17, 2022 . 1 changed file with 11 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,8 +3,9 @@ if [ -e "$1" ] ; then file=$(readlink -f "$1") dir=${file%/*} base=${file##*/} name=${base%.*} ext=${file##*.} else name=`basename "$0"` echo "usage: $name <file>" @@ -16,7 +17,12 @@ cd "$dir" || exit case "$ext" in cpp) cc "$file" -o "$base" && "$base" ;; tex) xelatex --output-directory="$dir" "$name" && xelatex --output-directory="$dir" "$name" ;; : ' WSL2 tex) xelatex.exe "$name" && xelatex.exe "$name" ;; ' esac -
muxocrypt created this gist
Mar 17, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ #!/usr/bin/env zsh if [ -e "$1" ] ; then file=$(readlink -f "$1") dir=${file%/*} base="${file%.*}" ext="${file##*.}" else name=`basename "$0"` echo "usage: $name <file>" exit fi cd "$dir" || exit case "$ext" in cpp) cc "$file" -o "$base" && "$base" ;; tex) xelatex --output-directory="$dir" "$base" && xelatex --output-directory="$dir" "$base" ;; esac