From ef52d6562997f5b0398e8b90963abee20b9b4d03 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Mon, 29 Aug 2022 13:37:58 +0200 Subject: [PATCH] bin: add context-mkiv --- .local/bin/scripts/clean | 2 +- .local/bin/scripts/context-mkiv | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100755 .local/bin/scripts/context-mkiv diff --git a/.local/bin/scripts/clean b/.local/bin/scripts/clean index 9d0d56e..bfeab47 100755 --- a/.local/bin/scripts/clean +++ b/.local/bin/scripts/clean @@ -49,7 +49,7 @@ fi highlight "d :: recursively remove development caches" if [[ $1 =~ "d" ]]; then - find -maxdepth 1 \( -name "*.aux" -o -name "*.log" -o -name "*.toc" -o -name "*.out" \) -print -delete + find -maxdepth 1 \( -name "*.aux" -o -name "*.log" -o -name "*.t[uo]c" -o -name "*.out" \) -print -delete find -name "src" -prune -o \ -type d \( -name 'cache' $(echo $DIRS_GENERATED | sed 's|-x \([^ ]\+\)|-o -name \1|g') \) \ -print -exec rm $i -r {} + -prune diff --git a/.local/bin/scripts/context-mkiv b/.local/bin/scripts/context-mkiv new file mode 100755 index 0000000..16302ab --- /dev/null +++ b/.local/bin/scripts/context-mkiv @@ -0,0 +1,7 @@ +#!/bin/sh -e +wd=$PWD +mkdir -p /tmp/context +cd /tmp/context +pdffile=${1%.*}.pdf +context --luatex --path=$wd "$wd/$@" +cp -v "/tmp/context/$pdffile" "$wd"