I tried to post this to the list some time ago. I'm not sure what happened:
Hello Everyone,
I really didn't feel like bothering with Cygwin in order to download all
the updates/packages. The following script seems to be totally
cross-platform, though I haven't rebooted to test it out in linux yet.
Oh and it also will continue unfinished downloads [instead of checking
if they exist]
I thought I'd throw it out on the list. It might need a little cleaning
up though, as I am definitely a perl novice.
You should download the win32 version of wget: this is where I got mine:
http://allserv.ugent.be/~bpuype/wget/
Take it easy,
Christian
# prepare.pl -- a perl version of the prepare script
# lets you run prepare without cygwin (tested on ActivePerl)
# It also requires a version of wget for win32
# largely copied from :
http://www.adp-gmbh.ch/perl/find.html
use warnings;
use strict;
use Cwd;
use File::Find;
use File::Path;
# Set the correct language
my $lang = "ENU";
if ( $ARGV[0] ) {
$lang = $ARGV[0];
}
# Set the current directory
my $current = cwd;
# look in the scripts directory
find(\&d, cwd."\/scripts");
sub d {
my $file = $File::Find::name;
$file =~ s,/,\\,g;
return unless -f $file;
return unless $file =~ m/(\.bat|\.aut)/i;
open F, $file or print "Couldn't open $file\n" && return;
while (<F>) {
if ( my $line = m/^\:\:\sURL\|($lang|ALL)\|(\S+)\|(\S+)\s/) {
my $url = $2;
# split dir and filename (I chose not to do this in the above
regexp)
my($directory, $filename) = $3 =~ m/(.*\/)(.*)$/;
# Make the path if it doesn't exist
mkpath("$current\/$directory");
system("wget -c -O $current\/$directory$filename $url");
}
}
close F;
}
Klaus Vink Slott wrote:
> At 14 December 2004 14:28 Tew, Edward wrote:
>
>>there are two cygwin scripts in install\tools called Prepare and Check
>>that do the hardwork for you.
>
> Yes reidg@... might be interested in the Step by step installation guide at
>
http://unattended.sourceforge.net/step-by-step.html
>
>
>>It is a bit of a pain having to install Cygwin just for this
>
> If you running Linux on your server (samba), both scripts runs perfectly from
> the server prompt.
>
> We are using Solaris at our site, but under Solaris I could not make the
> scripts work. For a quick and dirty solution I keep a copy on my Linux
> working machine and prepare the download directory here - and mirror it to
> our server.
>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
unattended-info mailing list
unattended-info@list...
https://lists.sourceforge.net/lists/listinfo/unattended-info
opensubscriber is not affiliated with the authors of this message nor responsible for its content.