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
|
*.synctex.gz
|
||||||
*.fdb_latexmk
|
*.fdb_latexmk
|
||||||
*.fls
|
*.fls
|
||||||
bericht/.cmd_ok
|
.cmd_ok
|
||||||
|
.inotifywait
|
||||||
|
2
Makefile
2
Makefile
@ -5,3 +5,5 @@ all:
|
|||||||
done
|
done
|
||||||
upload: all
|
upload: all
|
||||||
rsync -avcL www/ lctp@devkid.net:/
|
rsync -avcL www/ lctp@devkid.net:/
|
||||||
|
watch:
|
||||||
|
cd bericht && make watch
|
||||||
|
@ -1,7 +1,15 @@
|
|||||||
.cmd_ok:
|
.cmd_ok:
|
||||||
./check_cmds.sh
|
./check_cmds.sh .cmd_ok rsync latexmk
|
||||||
|
.inotifywait:
|
||||||
|
./check_cmds.sh .inotifywait inotifywait
|
||||||
%.pdf: %.tex
|
%.pdf: %.tex
|
||||||
latexmk -pdf $<
|
latexmk -pdf $<
|
||||||
all: .cmd_ok bericht.pdf
|
all: .cmd_ok bericht.pdf
|
||||||
clean:
|
clean:
|
||||||
latexmk -CA
|
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
|
#!/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
|
for cmd in ${NEEDED_COMMANDS} ; do
|
||||||
|
echo $cmd
|
||||||
if ! command -v ${cmd} &> /dev/null ; then
|
if ! command -v ${cmd} &> /dev/null ; then
|
||||||
echo Please install ${cmd}!
|
echo Please install ${cmd}!
|
||||||
exit -1
|
exit -1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
touch .cmd_ok
|
touch $FILE
|
||||||
|
Loading…
Reference in New Issue
Block a user