root/modules/branches/2.10/fw_arisvn.pl

Revision 11509, 1.2 kB (checked in by p_lindheimer, 2 years ago)

remove non numerics form version info in sed

  • Property svn:mime-type set to text/plain
  • Property svn_eol-style set to native
  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1 #!/usr/bin/perl
2
3 # This script (sculpted from publish.pl) will check the last tarball (which must be there)
4 # based on the fw_ari xml version number and then run svn log against all updates since
5 # fw_ari was last published.
6 #
7 $rver = "2.9";
8 $fwbranch = "branches/2.9";
9 $fw_ari = "fw_ari";
10
11 $moddir = 'fw_ari';
12
13 my $reldir = "release/";
14
15   open FH, "$moddir/module.xml";
16   $newxml = "";
17   $vers = "unset";
18   while (<FH>) {
19     if ($vers == 'unset' && /<version>(.+)<\/version>/) { $vers = $1; }
20     $newxml .= $_;
21   }
22   close FH;
23
24   die "Don't know version of $moddir" if ($vers eq "unset");
25   # Automatically check in any files that were modified but weren't checked into SVN
26
27   # Now we know the version. Get the svnversion.txt from the last update.
28   $filename = "../../$reldir"."$rver/$fw_ari-$vers.tgz";
29   print "CHECKING VERSION: ..... ";
30   #print "CHECKING VERSION WITH: tar -zxOf $filename $moddir/svnversion.txt: ...  ";
31   system("tar -zxOf ".$filename." ".$moddir."/svnversion.txt");
32   print "Geting svn log since that version for $rver : .... \n\n";
33   $svnver = system("svn log http://svn.freepbx.org/freepbx/$fwbranch/amp_conf/htdocs/recordings -r `tar -zxOf ".$filename." ".$moddir."/svnversion.txt | sed -e s/SVN\\\ VERSION:// | tr -cd '0-9'`:HEAD");
34
Note: See TracBrowser for help on using the browser.