-
Notifications
You must be signed in to change notification settings - Fork 70
/
Copy pathwatch.bash
executable file
·40 lines (32 loc) · 1015 Bytes
/
watch.bash
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
#!/bin/sh
daemon() {
chsum1=""
while [[ true ]]
do
chsum2=`find src/ -type f -exec md5 {} \;`
if [[ $chsum1 != $chsum2 ]] ; then
make
chsum1=`find src/ -type f -exec md5 {} \;`
fi
sleep 2
chsum4=`find static/templates/ -type f -exec md5 {} \;`
if [[ $chsum3 != $chsum4 ]] ; then
make
chsum3=`find static/templates/ -type f -exec md5 {} \;`
fi
sleep 2
chsum6=`find static/css/less/ -type f -exec md5 {} \;`
if [[ $chsum5 != $chsum6 ]] ; then
make
chsum5=`find static/css/less/ -type f -exec md5 {} \;`
fi
sleep 2
#chsum8=`find templates/*.handlebars -type f -exec md5 {} \;`
#if [[ $chsum7 != $chsum8 ]] ; then
# make
# chsum7=`find static/templates/*.handlebars -type f -exec md5 {} \;`
#fi
#sleep 2
done
}
daemon $*