[libdatetime-timezone-perl] 04/05: debian/tools/update-tzdata.sh: add $DateTime::TimeZone::*::VERSION to created files.

gregor herrmann gregoa at debian.org
Thu Oct 23 17:58:26 UTC 2014


This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository libdatetime-timezone-perl.

commit 6385cb2f3fbed4189acb0bbd26d018aec35d572d
Author: gregor herrmann <gregoa at debian.org>
Date:   Thu Oct 23 19:44:06 2014 +0200

    debian/tools/update-tzdata.sh: add $DateTime::TimeZone::*::VERSION to created files.
---
 debian/tools/update-tzdata.sh | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/debian/tools/update-tzdata.sh b/debian/tools/update-tzdata.sh
index fe186a6..80032cf 100644
--- a/debian/tools/update-tzdata.sh
+++ b/debian/tools/update-tzdata.sh
@@ -11,6 +11,7 @@ dh_testdir debian/changelog || die "You are not in the source package's root dir
 
 debdbversion=$(head -n1 debian/changelog  | sed 's/^.*+\([0-9a-z]*\)).*$/\1/')
 updbversion=$(wget -q -O- ${HOST}/ | grep tzdata | perl -pe 's/.+".+tzdata(.+)\.tar.gz".+/$1/')
+dttzversion=$(awk '/version =/ {print $3;}' dist.ini)
 
 if [ "$debdbversion" != "$updbversion" ] ; then
     echo "Debian dbversion $debdbversion != upstream dbversion $updbversion."
@@ -49,3 +50,10 @@ pushd debian/tzdata || die "Cannot cd debian/tzdata."
 popd
 
 perl tools/parse_olson --dir debian/tzdata --version $updbversion --clean
+
+# add VERSION to files
+for f in $(find lib/DateTime -name "*.pm"); do
+	grep -q "::VERSION = '$dttzversion';" $f && continue
+	module=$(echo $f | perl -pe 's{lib/DateTime/TimeZone/(.+)(?:(/.+))?.pm}{DateTime/TimeZone/$1$2}; s{/}{::}g;')
+	perl -pi -e "s{package $module;\s+}{$&\\\$${module}::VERSION = '$dttzversion';}m" $f
+done

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libdatetime-timezone-perl.git



More information about the Pkg-perl-cvs-commits mailing list