-
Notifications
You must be signed in to change notification settings - Fork 3
/
publish.sh
executable file
·46 lines (40 loc) · 1.73 KB
/
publish.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
#!/bin/sh
read -p "Do you wish to update the CVs? [y/n]" choice1
case "$choice1" in
y|Y ) echo "Updating CVs";make cv;;
* ) echo "Skipping compilation of CVs";;
esac
touch *.rst
make gettext
make compile_messages
make merge_messages
read -p "Do you wish to check the links? [y/n]" choice_link
case "$choice_link" in
y|Y ) echo "Checking links";make linkcheck;;
* ) echo "Skipping checking the links";;
esac
#check if translations are ok
# requires translate-toolkit
# 1 untranslated string is added by gettext, we have to study how to get rid of it
# now it seem mysteriously fixed, removing " | grep -v 1u"
echo ""
echo "**Statistics of untranslated (u) and fuzzy (f) strings**"
#pocount --incomplete --short-strings translated/*/*.po
pocount --incomplete --short-strings translated/en/*.po
pocount --incomplete --short-strings translated/fr/*.po
read -p "Are you sure you want to publish the website anyway? [y/n]" choice2
case "$choice2" in
# y|Y ) echo "Publishing website";make html&&rsync -avz --delete build/html/ test/&&cp htaccess_test test/.htaccess&&cp htpasswd_test test/.htpasswd;;
# NB: non funziona perche' make fallisce nella creazione del link
# non funziona il test
# test -e $(BUILDDIR)/html/pdf || ln -s /home/www/pdf $(BUILDDIR)/html/;
#originale:
y|Y ) echo "Publishing website";make html&&cp -R build/html/* test/;;
* ) echo "Messages compiled, site not published";;
esac
read -p "Site published in http://test.faunalia.eu, please check. Should I publish it? [y/n]" choice2
case "$choice2" in
# y|Y ) echo "Publishing website";rsync -avz --delete build/html/ stable/&&cp htaccess_stable stable/.htaccess;;
y|Y ) echo "Publishing website";cp -R build/html/* stable/;;
* ) echo "Test site published, stable not";;
esac