2010-05-08 11:49:47 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2012-06-05 11:46:52 +00:00
|
|
|
## live-build(7) - System Build Scripts
|
|
|
|
## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org>
|
|
|
|
##
|
|
|
|
## live-build comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
|
|
|
|
## This is free software, and you are welcome to redistribute it
|
|
|
|
## under certain conditions; see COPYING for details.
|
|
|
|
|
|
|
|
|
2010-05-08 11:49:47 +00:00
|
|
|
set -e
|
|
|
|
|
2010-09-02 11:31:35 +00:00
|
|
|
PROGRAM="LIVE\\\-BUILD"
|
2010-07-24 15:14:07 +00:00
|
|
|
VERSION="$(cat ../VERSION)"
|
2010-06-06 09:23:19 +00:00
|
|
|
|
2012-06-05 11:46:52 +00:00
|
|
|
DATE="$(LC_ALL=C date +%Y\\\\-%m\\\\-%d)"
|
|
|
|
|
|
|
|
DAY="$(LC_ALL=C date +%d)"
|
|
|
|
MONTH="$(LC_ALL=C date +%m)"
|
|
|
|
YEAR="$(LC_ALL=C date +%Y)"
|
|
|
|
|
2010-05-08 11:49:47 +00:00
|
|
|
echo "Updating version headers..."
|
|
|
|
|
|
|
|
for MANPAGE in en/*
|
|
|
|
do
|
|
|
|
SECTION="$(basename ${MANPAGE} | awk -F. '{ print $2 }')"
|
|
|
|
|
2010-06-06 09:23:19 +00:00
|
|
|
sed -i -e "s|^.TH.*$|.TH ${PROGRAM} ${SECTION} ${DATE} ${VERSION} \"Debian Live Project\"|" ${MANPAGE}
|
2010-05-08 11:49:47 +00:00
|
|
|
done
|
2012-06-05 11:46:52 +00:00
|
|
|
|
|
|
|
# European date format
|
|
|
|
for _LANGUAGE in de es fr it
|
|
|
|
do
|
|
|
|
if ls po/${_LANGUAGE}/*.po > /dev/null 2>&1
|
|
|
|
then
|
|
|
|
for _FILE in po/${_LANGUAGE}/*.po
|
|
|
|
do
|
|
|
|
sed -i -e "s|^msgstr .*.2012\"$|msgstr \"${DAY}.${MONTH}.${YEAR}\"|g" "${_FILE}"
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
# Brazilian date format
|
|
|
|
if ls po/pt_BR/*.po > /dev/null 2>&1
|
|
|
|
then
|
|
|
|
for _FILE in po/pt_BR/*.po
|
|
|
|
do
|
|
|
|
sed -i -e "s|^msgstr .*-2012\"$|msgstr \"${DAY}-${MONTH}-${YEAR}\"|g" "${_FILE}"
|
|
|
|
done
|
|
|
|
fi
|