-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitpull.sh
44 lines (36 loc) · 875 Bytes
/
gitpull.sh
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
#!/usr/bin/env bash
#echo "$(dirname "$0")"
cd "$(dirname "$0")/.."
cd fsa
git checkout X/summaryLex.txt
rm X/AllLexicon_Extra.txt
#git checkout X/AllLexicon_Extra.txt #removed from repository.
git checkout X/SegmentSlash.txt
git checkout X/defPlus.txt
git fetch
git pull
git log --pretty=format:'%h' -n 1 > ../parser/revision.txt
cd X
bash SegmentSlash.sh
cd ..
cd ../parser
#git checkout .
git stash
git pull
git stash apply
python3 -m compileall -b src
#find . -name "*.py" -delete
# echo -n " " >> revision.txt
echo " \c" >> revision.txt
git log --pretty=format:'%h' -n 1 >> revision.txt
echo "" >> revision.txt
date >> revision.txt
# Check if file older
if test `find "../parser/data/parser.empty.db" -mmin +1440`
then
exit
fi
echo "File parser.empty.db is recently modified in last day"
cd ../parser/data
rm parser.db*
cp parser.empty.db parser.db