aboutsummaryrefslogtreecommitdiffhomepage
path: root/markup/pod/live-manual/media/text/bin/update-version.sh
blob: 3a9d2e4e2744c61cb7f8ffca11991f80faba06a2 (plain)
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
#!/bin/sh

set -e

VERSION="$(cat ../VERSION)"

DAY="$(LC_ALL=C date +%d)"
MONTH="$(LC_ALL=C date +%m)"
YEAR="$(LC_ALL=C date +%Y)"

echo "Updating version information..."
sed -i  -e "s|^ :published:.*$| :published: ${YEAR}-${MONTH}-${DAY}|" \
	-e "s|(C) 2006-.*|(C) 2006-${YEAR} Live Systems Project|" \
en/live-manual.ssm

# European date format
for _LANGUAGE in ca de es fr it pl ro
do
	if [ -e po/${_LANGUAGE}/live-manual.ssm.po ]
	then
		sed -i -e "s|:published: .*.${YEAR}|:published: ${DAY}.${MONTH}.${YEAR}|" \
		po/${_LANGUAGE}/live-manual.ssm.po
	fi
done

# Brazilian date format
if [ -e po/pt_BR/live-manual.ssm.po ]
then
	sed -i -e "s|:published: .*-${YEAR}|:published: ${DAY}-${MONTH}-${YEAR}|" \
	po/pt_BR/live-manual.ssm.po
fi