From: Chris W. <la...@us...> - 2005-02-02 16:17:05
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Manage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv521 Modified Files: Website.pm Log Message: modify website upgrade to use OI2::Brick framework and move common code to parent class Index: Website.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Manage/Website.pm,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Website.pm 2 Feb 2005 13:08:47 -0000 1.22 --- Website.pm 2 Feb 2005 16:16:51 -0000 1.23 *************** *** 90,93 **** --- 90,108 ---- } + sub _install_packages_from_bricks { + my ( $self, $website_dir, $package_names ) = @_; + foreach my $name ( @{ $package_names } ) { + my $brick_name = 'pkg_' . $name; + my $brick = OpenInteract2::Brick->new( $brick_name ); + foreach my $pkg_name ( $brick->list_resources ) { + my $pkg_info = $brick->load_resource( $pkg_name ); + my $pkg_file = OpenInteract2::Util->decode_base64_and_store( + \$pkg_info->{content} + ); + $self->_install_package_file( undef, $pkg_file, $website_dir ); + } + } + } + # Find all distribution packages in $source_dir/pkg |