Revision: 683 http://sourceforge.net/p/opencsw/code/683 Author: dmichelsen Date: 2015-03-22 14:05:02 +0000 (Sun, 22 Mar 2015) Log Message: ----------- make-freeze-opencsw-future: Initial commit
Added Paths: ----------- buildfarm/bin/make-freeze-opencsw-future Added: buildfarm/bin/make-freeze-opencsw-future =================================================================== --- buildfarm/bin/make-freeze-opencsw-future (rev 0) +++ buildfarm/bin/make-freeze-opencsw-future 2015-03-22 14:05:02 UTC (rev 683) @@ -0,0 +1,52 @@ +#!/opt/csw/bin/perl + +use strict; +use warnings; + +my ($year,$month) = @ARGV; +my $date = "${year}${month}01"; + +my $base = "/export/mirror/opencsw-future/"; +mkdir( $base ); + +my @archs = (qw( sparc i386 )); +my @vers = (qw( 5.8 5.9 5.10 5.11 )); + +my $ok = 1; +# Make sure we have all catalogs +foreach my $a (@archs) { + foreach my $v (@vers) { + my $catalog = "/export/mirror/opencsw/distribution/allcatalogs/catalog-$a-$v-$date"; + if( ! -f $catalog ) { + print STDERR "The catalog '$catalog' is missing.\n"; + $ok = 0; + } + } +} + +my $freeze = "$base/snapshots"; +mkdir( $freeze ); + +my $fcurrent = "$freeze/${year}.${month}"; +mkdir( $fcurrent ) || die "Directory '$fcurrent' can not be created: $!" ; + +foreach my $a (@archs) { + mkdir "$fcurrent/$a"; + foreach my $v (@vers) { + mkdir "$fcurrent/$a/$v"; + system( "cp /export/mirror/opencsw/distribution/allcatalogs/catalog-$a-$v-$date $fcurrent/$a/$v/catalog"); + system( "cp /export/mirror/opencsw/distribution/allcatalogs/descriptions-$a-$v-$date $fcurrent/$a/$v/descriptions"); + # 9menu 1.8,REV=2006.05.19 CSW9menu 9menu-1.8,REV=2006.05.19-SunOS5.8-i386-CSW.pkg.gz 51eaeee15a71a4290789729feb956759 12196 CSWcommon none + open C, "$fcurrent/$a/$v/catalog"; + my $drop; $drop = <C>; $drop = <C>; $drop = <C>; + while( <C> ) { + last if( /^-----/ ); + chomp; + s/#.*//; + next if( /^$/ ); + my ($cname, $rev, $pkgname, $fname, $md5sum, $size, $dep, $idep) = split; + link "$base/allpkgs/$fname", "$fcurrent/$a/$v/$fname" || print STDERR "Problem linking $fname: $!"; + } + close C; + } +} Property changes on: buildfarm/bin/make-freeze-opencsw-future ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.