#!C:/Perl/bin/perl ################################################################### # apxs, apr-config, and apu-config are Apache utilities used # # to both get certain configuration information and also to # # assist in building Apache modules. These utilities have not # # yet been officially ported to Win32. The following will fetch # # and install a development version of these scripts which can # # be used in both mod_perl 2 and Apache C modules. # # # # Please report problems in installing or using these utilties to # # Randy Kobes # ################################################################### use strict; use warnings; use ExtUtils::MakeMaker qw(prompt); use Cwd; die "This is intended for Win32" unless ($^O =~ /Win32/i); print << "END"; I can now install some optional tt2 stuff, including documentation, examples, and the splash library, if you like. This can go in any convenient location - the default is "$ENV{ProgramFiles}". The installation will go under a "tt2" subdirectory of the directory you specify. END my $ans = prompt('Proceed with install?', 'yes'); exit 0 unless $ans =~ /^y/i; my $dir = prompt('Under which directory?', $ENV{ProgramFiles}); unless (-d $dir) { mkdir $dir or die "Cannot mkdir $dir: $!"; } chdir $dir or die "Cannot chdir to $dir: $!"; require LWP::Simple; LWP::Simple->import(qw(is_success getstore)); $| = 1; my $file = 'tt2.tar.gz'; my $remote = 'http://landfill.bugzilla.org/ppm/scripts/' . $file; print "Fetching $remote ... "; die "Download of $remote failed" unless (is_success(getstore($remote, $file))); print " done!\n"; require Archive::Tar; my $arc = Archive::Tar->new($file, 1); print "Extracting files under $dir ... please wait ..."; $arc->extract($arc->list_files()); print " done!\n"; die "Unpacking $file failed" unless (-d "$dir/tt2"); unlink $file or warn "unlink of $file failed: $!";