Watch Target um LaTeX automatisch zu kompellieren.
This commit is contained in:
parent
0a3fc94e9e
commit
b5dfe4bc5f
3
.gitignore
vendored
3
.gitignore
vendored
@ -26,4 +26,5 @@
|
||||
*.synctex.gz
|
||||
*.fdb_latexmk
|
||||
*.fls
|
||||
bericht/.cmd_ok
|
||||
.cmd_ok
|
||||
.inotifywait
|
||||
|
2
Makefile
2
Makefile
@ -5,3 +5,5 @@ all:
|
||||
done
|
||||
upload: all
|
||||
rsync -avcL www/ lctp@devkid.net:/
|
||||
watch:
|
||||
cd bericht && make watch
|
||||
|
@ -1,7 +1,15 @@
|
||||
.cmd_ok:
|
||||
./check_cmds.sh
|
||||
./check_cmds.sh .cmd_ok rsync latexmk
|
||||
.inotifywait:
|
||||
./check_cmds.sh .inotifywait inotifywait
|
||||
%.pdf: %.tex
|
||||
latexmk -pdf $<
|
||||
all: .cmd_ok bericht.pdf
|
||||
clean:
|
||||
latexmk -CA
|
||||
watch: .inotifywait
|
||||
echo "Abort with Ctrl+C"
|
||||
while (true); do\
|
||||
inotifywait -e MOVE_SELF -e "modify" bericht.tex;\
|
||||
latexmk -pdf bericht.tex; \
|
||||
done
|
||||
|
@ -1,12 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
NEEDED_COMMANDS="rsync latexmk"
|
||||
|
||||
if [ "$#" -lt 2 ]; then
|
||||
echo "USAGE: $0 file commands..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
FILE=$1
|
||||
shift
|
||||
NEEDED_COMMANDS=$@
|
||||
|
||||
for cmd in ${NEEDED_COMMANDS} ; do
|
||||
echo $cmd
|
||||
if ! command -v ${cmd} &> /dev/null ; then
|
||||
echo Please install ${cmd}!
|
||||
exit -1
|
||||
fi
|
||||
done
|
||||
|
||||
touch .cmd_ok
|
||||
touch $FILE
|
||||
|
Loading…
Reference in New Issue
Block a user