source: live-build/trunk/fuentes/manpages/bin/update-version.sh @ 900

Last change on this file since 900 was 900, checked in by kbut, 3 years ago

add original source

  • Property svn:executable set to *
File size: 1.1 KB
Line 
1#!/bin/sh
2
3## live-build(7) - System Build 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.
9
10
11set -e
12
13PROGRAM="LIVE\\\-BUILD"
14VERSION="$(cat ../VERSION)"
15
16DATE="$(LC_ALL=C date +%Y\\\\-%m\\\\-%d)"
17
18DAY="$(LC_ALL=C date +%d)"
19MONTH="$(LC_ALL=C date +%m)"
20YEAR="$(LC_ALL=C date +%Y)"
21
22echo "Updating version headers..."
23
24for MANPAGE in en/*
25do
26        SECTION="$(basename ${MANPAGE} | awk -F. '{ print $2 }')"
27
28        sed -i -e "s|^.TH.*$|.TH ${PROGRAM} ${SECTION} ${DATE} ${VERSION} \"Debian Live Project\"|" ${MANPAGE}
29done
30
31# European date format
32for _LANGUAGE in de es fr it
33do
34        if ls po/${_LANGUAGE}/*.po > /dev/null 2>&1
35        then
36                for _FILE in po/${_LANGUAGE}/*.po
37                do
38                        sed -i -e "s|^msgstr .*.2012\"$|msgstr \"${DAY}.${MONTH}.${YEAR}\"|g" "${_FILE}"
39                done
40        fi
41done
42
43# Brazilian date format
44if ls po/pt_BR/*.po > /dev/null 2>&1
45then
46        for _FILE in po/pt_BR/*.po
47        do
48                sed -i -e "s|^msgstr .*-2012\"$|msgstr \"${DAY}-${MONTH}-${YEAR}\"|g" "${_FILE}"
49        done
50fi
Note: See TracBrowser for help on using the repository browser.