Use PERSISTENCE_PATH with a trailing "/".
[debian-live-boot.git] / manpages / bin / update-version.sh
blob725ebab0a2757a5c2e59e5bd1af5061e0953d289
1 #!/bin/sh
3 ## live-boot(7) - System Boot Components
4 ## Copyright (C) 2006-2013 Daniel Baumann <mail@daniel-baumann.ch>
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} \"Live Systems 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 .*.2013-.*$|msgstr \"${DAY}.${MONTH}.${YEAR}\"|g" \
39 -e "s|^msgstr .*.2013\"$|msgstr \"${DAY}.${MONTH}.${YEAR}\"|g" \
40 "${_FILE}"
41 done
43 done
45 # Brazilian date format
46 if ls po/pt_BR/*.po > /dev/null 2>&1
47 then
48 for _FILE in po/pt_BR/*.po
50 sed -i -e "s|^msgstr .*.2013-.*$|msgstr \"${DAY}-${MONTH}-${YEAR}\"|g" \
51 -e "s|^msgstr .*-2013\"$|msgstr \"${DAY}-${MONTH}-${YEAR}\"|g" \
52 "${_FILE}"
53 done