Changeset 868
- Timestamp:
- 11/23/08 07:36:19 (3 years ago)
- File:
-
- 1 edited
-
trunk/core/pseudo-install.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/core/pseudo-install.pl
r828 r868 57 57 from the parent directory of the current checkout. 58 58 59 Usage: pseudo-install.pl - felc[all|default|developer|<module>...]59 Usage: pseudo-install.pl -[feA][l|c|u] [all|default|developer|<module>...] 60 60 -f[orce] - force an action to complete even if there are warnings 61 61 -e[nable] - automatically enable installed plugins in LocalSite.cfg … … 69 69 developer - default + key developer environment 70 70 <module>... one or more extensions to install 71 -[A]utoconf - make a simplistic LocalSite.cfg, using just the defaults in lib/Foswiki.spec 71 72 72 73 Example: 73 perl pseudo-install.pl -force -enable -link FirstPlugin SomeContrib 74 softlink and enable FirstPlugin and SomeContrib 75 perl pseudo-install.pl -force -enable -link FirstPlugin SomeContrib 76 77 78 check out a new trunk, create a default LocalSite.cfg, install and enable 79 all the plugins for the default distribution (and then run the unit tests) 80 svn co http://svn.fosiki.org/trunk 81 cd trunk/core 82 ./pseudo-install -A developer 83 cd test/unit 84 ../bin/TestRunner -clean FoswikiSuite.pm 85 74 86 EOM 75 87 … … 256 268 } 257 269 270 sub Autoconf { 271 my( $moduleDir, $dir, $file ) = @_; 272 273 my $foswikidir = $basedir; 274 my $localSiteCfg = $foswikidir.'/lib/LocalSite.cfg'; 275 if ($force || (! -e $localSiteCfg)) { 276 my $localsite = `grep 'Foswiki::cfg' $foswikidir/lib/Foswiki.spec`; 277 278 $localsite =~ s|/home/httpd/foswiki|$foswikidir|g; 279 # single # seems to denote an important param that needs to be set 280 $localsite =~ s|# \$Foswiki|\$Foswiki|g; 281 282 if (open(LS, '>', $localSiteCfg)) { 283 print LS $localsite; 284 close(LS); 285 print STDERR "wrote simple config to $localSiteCfg\n\n"; 286 } else { 287 print STDERR "ERROR: failed to write to $localSiteCfg\n\n"; 288 } 289 } else { 290 print "ERROR: won't overwrite $localSiteCfg without -force\n\n"; 291 } 292 } 293 258 294 sub enablePlugin { 259 295 my ($module, $installing, $libDir) = @_; … … 293 329 my $autoenable = 1; 294 330 my $installing = 1; 331 my $autoconf = 0; 295 332 $install = $CAN_LINK ? \&just_link : \©_in; 296 333 … … 310 347 } elsif ($arg =~ /^-m/) { 311 348 $autoenable = 1; 312 } 349 } elsif ($arg =~ /^-A/) { 350 $autoconf = 1; 351 } 352 } 353 354 if ($autoconf) { 355 Autoconf(); 356 exit 1 unless (scalar(@ARGV)); 313 357 } 314 358
Note: See TracChangeset
for help on using the changeset viewer.
