Adding debian version 4.0~a1-1.
[debian-live-boot.git] / manpages / bin / update-version.sh
blob6326adad1ed0fede69a14d3e12e49b40cd049a78
1 #!/bin/sh
3 ## live-boot(7) - System Boot Scripts
4 ## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org>
5 ##
6 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
7 ## This is free software, and you are welcome to redistribute it
8 ## under certain conditions; see COPYING for details.
11 set -e
13 PROGRAM="LIVE\\\-BOOT"
14 VERSION="$(cat ../VERSION)"
16 DATE="$(LC_ALL=C date +%Y\\\\-%m\\\\-%d)"
18 DAY="$(LC_ALL=C date +%d)"
19 MONTH="$(LC_ALL=C date +%m)"
20 YEAR="$(LC_ALL=C date +%Y)"
22 echo "Updating version headers..."
24 for MANPAGE in en/*
26 SECTION="$(basename ${MANPAGE} | awk -F. '{ print $2 }')"
28 sed -i -e "s|^.TH.*$|.TH ${PROGRAM} ${SECTION} ${DATE} ${VERSION} \"Debian Live Project\"|" ${MANPAGE}
29 done
31 # European date format
32 for _LANGUAGE in de es fr it
34 if ls po/${_LANGUAGE}/*.po > /dev/null 2>&1
35 then
36 for _FILE in po/${_LANGUAGE}/*.po
38 sed -i -e "s|^msgstr .*.2012\"$|msgstr \"${DAY}.${MONTH}.${YEAR}\"|g" "${_FILE}"
39 done
41 done
43 # Brazilian date format
44 if ls po/pt_BR/*.po > /dev/null 2>&1
45 then
46 for _FILE in po/pt_BR/*.po
48 sed -i -e "s|^msgstr .*-2012\"$|msgstr \"${DAY}-${MONTH}-${YEAR}\"|g" "${_FILE}"
49 done