-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate_all_website_flyers.sh
executable file
·92 lines (69 loc) · 2.5 KB
/
update_all_website_flyers.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
89
90
91
92
#!/bin/bash
# Copyright (c) 2019 Software in the Public Interest, Inc.
# Owner : Alban Vidal <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 dated June, 1991.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
DEBUG=${DEBUG:=false}
################################################################################
# Update "all in one" PostScript and PDF files (all.ps and all.pdf)
make all.ps all.pdf
# Move "all in one" to the final directory
mv all.ps all.pdf pages.debian.net/files/
mv all.pdf pages.debian.net/files/
################################################################################
# Update jpg English flyer (flyer.jpg)
make flyer.jpg
# Move English flyer.jpg to the final directory
mv flyer.jpg pages.debian.net/files/
################################################################################
# Update PostScript and PDF flyers for each languages
# - side 1 English
# - side 2 language
# Languages list
# code:language
list_lang="
da:dansk
de:deutsch
es:espanyol
fr:francaise
it:italiano
nl:nederlands
pt:portugues
sv:svenska
"
for lang in $list_lang ; do
# Clean for each language
make clean
code=${lang%:*} # Extracting language code
name=${lang#*:} # Extracting language name
$DEBUG && echo -e "DEBUG: code = $code ; name = $name"
# Create the flypers
make lang1=english lang2=$name flyer.ps flyer.pdf
# Move and rename the flyers to the final directory
mv flyer.ps pages.debian.net/files/flyer_en_${code}.ps
mv flyer.pdf pages.debian.net/files/flyer_en_${code}.pdf
done
################################################################################
# Update social contract (social_contract.pdf)
cd social_contract/
make
# Move to final directory
mv social_contract.pdf ../pages.debian.net/files/
# Clean the social_contract directory
make clean
# Return to the parent directory
cd ..
################################################################################
# Final clean
make clean