This is a collection of dotfiles and scripts for my bspwm setup
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
if [ "$1" = "kill" ]; then
|
|
|
|
pkill latex.sh
|
|
|
|
else
|
|
|
|
DIR="$1"
|
|
|
|
OUT="$DIR/out"
|
|
|
|
mkdir -p $OUT
|
|
|
|
HASH="$(md5sum $DIR/main.tex)"
|
|
|
|
|
|
|
|
while true; do
|
|
|
|
sleep 1
|
|
|
|
|
|
|
|
TMP="$(md5sum $DIR/main.tex)"
|
|
|
|
if [ "$HASH" != "$TMP" ]; then
|
|
|
|
HASH="$TMP"
|
|
|
|
pdflatex -no-file-line-error -interaction=nonstopmode -synctex=1 \
|
|
|
|
-output-format=pdf -output-directory=$OUT $DIR/main.tex \
|
|
|
|
> /dev/null 2>&1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|