diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2011-07-04 21:14:43 +0000 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2011-07-04 21:14:43 +0000 |
commit | 7bd8379896b14565651bbecf6c0a12006a970282 (patch) | |
tree | 963a64ff28085593148ae978a7bb846973331fd3 /make-version.pl | |
parent | e85447a30fd94068b29dfb649f5be51ae4411c30 (diff) | |
download | wireshark-7bd8379896b14565651bbecf6c0a12006a970282.tar.gz wireshark-7bd8379896b14565651bbecf6c0a12006a970282.tar.bz2 wireshark-7bd8379896b14565651bbecf6c0a12006a970282.zip |
Fetch svn revision also when checked out with git-svn.
svn path=/trunk/; revision=37895
Diffstat (limited to 'make-version.pl')
-rwxr-xr-x | make-version.pl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/make-version.pl b/make-version.pl index f59ba21495..74f2a10ad1 100755 --- a/make-version.pl +++ b/make-version.pl @@ -80,6 +80,7 @@ my %version_pref = ( #"pkg_format" => "", ); my $srcdir = "."; +my $svn_info_cmd = ""; $ENV{LANG} = "C"; # Ensure we run with correct locale @@ -104,7 +105,7 @@ sub read_svn_info { eval { use warnings "all"; no warnings "all"; - $line = qx{svn info $srcdir}; + $line = qx{$svn_info_cmd}; if (defined($line)) { if ($line =~ /Last Changed Date: (\d{4})-(\d\d)-(\d\d) (\d\d):(\d\d):(\d\d)/) { $last_change = timegm($6, $5, $4, $3, $2 - 1, $1); @@ -311,6 +312,12 @@ sub get_config { &get_config(); if (-d "$srcdir/.svn") { + $svn_info_cmd = "svn info $srcdir"; +} elsif (-d "$srcdir/.git/svn") { + $svn_info_cmd = "git svn info $srcdir"; +} + +if ($svn_info_cmd) { print "This is a build from SVN (or a SVN snapshot).\n"; &read_svn_info(); if ($pkg_version) { |