From: <Cra...@nt...> - 2005-10-11 18:08:54
|
Author: CrawfordCurrie Date: 2005-10-11 11:08:07 -0700 (Tue, 11 Oct 2005) New Revision: 6980 Added: twiki/branches/DEVELOP/pseudo-install.pl Log: Item145: added pseudo-install script for installing plugins in SVN checkout areas on platforms where softlinks don't work. Does a copy of all the files in the MANIFEST, so actually better than mklinks.sh in most respects, and robably better for develop.twiki.org Added: twiki/branches/DEVELOP/pseudo-install.pl =================================================================== --- twiki/branches/DEVELOP/pseudo-install.pl 2005-10-11 16:34:37 UTC (rev 6979) +++ twiki/branches/DEVELOP/pseudo-install.pl 2005-10-11 18:08:07 UTC (rev 6980) @@ -0,0 +1,35 @@ +#!perl +# pseduo-install plugins in a SVN checkout tree +# This is done by a simple copy of the files listed in the MANIFEST for each +# plugin and contrib. There is no linking, and no attempt to be clever. It should +# be equivalent to a zip - unzip of the plugin over the dev tree. +# +# Intended for use on PC where softlinks (as done by mklinks.sh) are not +# available +use strict; +use File::Path; +use File::Copy; + +opendir(D, "twikiplugins") || die "Must be run from root of installation"; +foreach my $module ( grep { /(Plugin|Contrib)$/ } readdir( D )) { + print "Processing $module\n"; + my $subdir = 'Plugins'; + $subdir = 'Contrib' if $module =~ /Contrib$/; + if( -e "twikiplugins/$module/lib/TWiki/$subdir/$module/MANIFEST" ) { + open( F, "<twikiplugins/$module/lib/TWiki/$subdir/$module/MANIFEST" ) || die $!; + foreach my $file ( <F> ) { + chomp( $file ); + next unless $file =~ /^\w+/; + $file =~ s/\s.*$//; + next if -d "twikiplugins/$module/$file"; + my $dir = $file; + $dir =~ s/\/[^\/]*$//; + File::Path::mkpath( $dir ); + File::Copy::copy( "twikiplugins/$module/$file", $file ); + } + close(F); + } else { + print STDERR "No MANIFEST in $module\n"; + } +} +closedir( D ); |