LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File update_from_svn.pl of Package avr-libc (Project openSUSE:Dropped)

#! /usr/bin/perl -w
#
# update_from_svn.pl -- script to update buildservice package from source.
# 2009-10-22, jw
# 2009-11-01, jw

use POSIX;

my $name = shift;

my $now = strftime "svn%Y%m%d", localtime;
my $url = '';
my $v;
open IN, <*.spec>;
while (defined (my $line = <IN>))
  {
    chomp $line;
    $url = $1 if $line =~ m{^Url:\s+(\S+)};
    $name = $1 if $line =~ m{^Name:\s+(\S+)};
    last if $name and $url;
  }
print "now=$now\n";
print "url=$url\n";
print "name=$name\n";

$v .= $now;

# cvs -z6 -d:pserver:anonymous@cvs.sv.gnu.org:/sources/avr-libc export -d avr-libc-cvs20091101 -D now avr-libc
$cmd = "svn export $url $name-$v && tar czf $name-$v.tar.gz $name-$v";
system $cmd;