aboutsummaryrefslogtreecommitdiffhomepage
path: root/markup/pod/live-manual/media/text/bin/update-version.sh
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2021-11-27 21:54:49 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2021-11-27 21:54:49 -0500
commit78b1b83be0cf04b4cba707751b7ad4d97787fe37 (patch)
tree0260daae62c3c0c055b7ec73b274fa82b31b344f /markup/pod/live-manual/media/text/bin/update-version.sh
track document samples used
Diffstat (limited to 'markup/pod/live-manual/media/text/bin/update-version.sh')
-rwxr-xr-xmarkup/pod/live-manual/media/text/bin/update-version.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/markup/pod/live-manual/media/text/bin/update-version.sh b/markup/pod/live-manual/media/text/bin/update-version.sh
new file mode 100755
index 0000000..3a9d2e4
--- /dev/null
+++ b/markup/pod/live-manual/media/text/bin/update-version.sh
@@ -0,0 +1,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