-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathedition.launch
More file actions
executable file
·44 lines (36 loc) · 852 Bytes
/
edition.launch
File metadata and controls
executable file
·44 lines (36 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
SRCDIR=src
# trap ctrl-c and call ctrl_c()
trap ctrl_c INT
function ctrl_c() {
`find . -type f -executable -name killall_launcher.sh -print`
exit 1
}
if ! command -v inotifywait &> /dev/null
then
echo "inotifywait could not be found."
echo "Please run: sudo apt-get install inotify-tools"
exit
fi
f=$(grep -Elr 'documentclass' `find $(SRCDIR) -name "*.tex"` | cut -d':' -f1)
filelist=''
for file in $f
do
file=${file##*/}
file=${file%.*}
filelist=$filelist' ./build/'$file'.pdf '
done
echo "files to track are "$filelist
if [ $# -eq 0 ]; then
make fast
okular $filelist &
`find . -type f -executable -name make_launcher.sh -print`
else
make "$@"
okular ./build/$@.pdf &
`find . -type f -executable -name make_launcher.sh -print` $@
fi
code . &
while true; do
sleep 1
done