-
Notifications
You must be signed in to change notification settings - Fork 15
/
deploy.sh
executable file
·88 lines (74 loc) · 2.47 KB
/
deploy.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/bin/bash
# Restore deleted files
git checkout $(git ls-files -d)
git pull
CHANGES=`git whatchanged --since="3 days ago" -p pubs/ src_docs/ media/ resume_src/`
rm -f python/*.pyc
rm -f pubs/*.tex
mkdir -p ~/public_html/dyn-media
mkdir -p ~/public_html/dyn-pubs
rm -rf ~/public_html/teaching/*
for CLASS in LBSC_690_2012 INFM_718_2011 COS_280_2008 CMSC_773_2012 DATA_DIGGING CMSC_723 DEEP CSCI_5622 CSCI_3022 CSCI_7000 CMSC_726 INST_414 INST_808 CMSC_470 CMSC_848 GRAD_IND UG_IND
do
mkdir -p ~/public_html/teaching/$CLASS
cp teaching/$CLASS/*.* ~/public_html/teaching/$CLASS
for SUBDIR in slides reading
do
if [ -d teaching/$CLASS/$SUBDIR ]
then
mkdir -p ~/public_html/teaching/$CLASS/$SUBDIR
cp teaching/$CLASS/$SUBDIR/*.* ~/public_html/teaching/$CLASS/$SUBDIR
fi
done
done
for SUBDIR in docs images downloads style projects sound
do
mkdir -p ~/public_html/$SUBDIR
cp $SUBDIR/*.* ~/public_html/$SUBDIR
done
rm -rf ~/public_html/qb
cp -r qb ~/public_html/
PYCOMMAND=./venv/bin/python3
echo "USING $PYCOMMAND"
$PYCOMMAND python/site.py `git show -s --format=%ci`
if [ ${#CHANGES} -gt 0 ]
then
echo "CHANGES DETECTED!"
cp ~/public_html/dyn-pubs/venue.txt resume_src/pubs_by_venue.tex
$PYCOMMAND python/extract_media_coverage.py ~/public_html/dyn-media/category.txt resume_src/media.tex
echo "Done media"
for FILE in teaching umd_research research teaching_umd
do
pdflatex resume_src/$FILE > log.txt
bibtex $FILE
done
# echo "Done rsearch"
for FILE in public umd short_cv teaching teaching_umd service diversity research german funding_wrapper publications_wrapper funding_wrapper umd_research
do
echo $FILE
echo "---------------------------"
pdflatex resume_src/$FILE > log.txt
mv $FILE.pdf ~/public_html/docs
done
cp resume_src/letter.html ~/public_html/docs
for FILE in `ls -r pubs/*.tex`
do
echo $FILE
echo "---------------------------"
pdflatex $FILE > ${FILE/.tex/.log}
PDFFILE="${FILE/.tex/.pdf}"
ls -lh "${PDFFILE/pubs/.}"
mv "${PDFFILE/pubs/.}" ~/public_html/docs
done
fi
grep "pdfpages Error" pubs/*.log
rm *.aux *.log *.out;
rm pubs/#*#
rm pubs/*~
# Clean up cruft
rm */*~
rm *~
rm */*/*~
rm pubs/*.log
rm docs/*.pdf
git checkout $(git ls-files -d)