forked from robin-nitrokey/nitrokey-documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapply_translated_content.sh
More file actions
executable file
·23 lines (16 loc) · 1023 Bytes
/
apply_translated_content.sh
File metadata and controls
executable file
·23 lines (16 loc) · 1023 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
echo "$(date) [apply_translated_content.sh] webhook Weblate triggered. Building language versions." >> /var/www/sphinx/logs_sphinx/webhook.log
cd /var/www/sphinx/sphinx/nitrokey-documentation
# pull new content
git pull
# clean excluded files
# git clean -f -d
# building German version
sphinx-build -a -D language='de' -b html /var/www/sphinx/sphinx/nitrokey-documentation/ /var/www/sphinx/www/docs.nitrokey.com_de_temp
rm -r /var/www/sphinx/www/static/de/
mv /var/www/sphinx/www/docs.nitrokey.com_de_temp /var/www/sphinx/www/static/de
echo "$(date) [apply_translated_content.sh] German DONE." >> /var/www/sphinx/logs_sphinx/webhook.log
# building French version
sphinx-build -a -D language='fr' -b html /var/www/sphinx/sphinx/nitrokey-documentation/ /var/www/sphinx/www/docs.nitrokey.com_fr_temp
rm -r /var/www/sphinx/www/static/fr
mv /var/www/sphinx/www/docs.nitrokey.com_fr_temp /var/www/sphinx/www/static/fr
echo "$(date) [apply_translated_content.sh] French DONE." >> /var/www/sphinx/logs_sphinx/webhook.log