From: Sam H. v. a. <we...@ma...> - 2005-11-21 17:35:23
|
Log Message: ----------- utility script to create tarballs of problem libraries. Added Files: ----------- webwork2/bin: export_problem_libraries_from_cvs.pl Revision Data ------------- --- /dev/null +++ bin/export_problem_libraries_from_cvs.pl @@ -0,0 +1,46 @@ +#!/usr/bin/perl -w + +use strict; + +## run this script in a directory that does not contain +## any files whose names end in ".tar.gz" since this +## produces one such file for each module below and then +## at the end + +## list the repository name and then the module name +my @repository_module = qw( +rochester rochester_problib +rochester rochester_grade8problems +rochester rochester_physics_problib +asu asu_problib +asu database_problems +dartmouth dartmouth_problib +dcds dcds_problib +indiana indiana_problib +nau nau_problib +ohio-state osu_problib +sunysb sunysb_problib +tcnj tcnj_problib +unh unh_highschool_problib +unh unh_problib +union union_problib +); + +my ($repository, $module, @command_args); +my @tar_file_list = (); + +while (@repository_module ) { + $repository = shift @repository_module; + $module = shift @repository_module; + mkdir $module; + @command_args = qq(cvs -q -d :ext:apizer\@devel.webwork.rochester.edu:/webwork/cvs/$repository export -D now -d $module $module); + system (@command_args); + push @tar_file_list, "${module}.tar.gz"; + @command_args = qq(tar -czf ${module}.tar.gz $module); + system (@command_args); + @command_args = qq(rm -r $module); + system (@command_args); +} + +@command_args = qq(tar -czf all_problem_libraries.tar.gz @tar_file_list); +system (@command_args); \ No newline at end of file |