Changeset 1743


Ignore:
Timestamp:
2000-12-05T15:56:25+13:00 (23 years ago)
Author:
sjboddie
Message:

Had a bit of a go at getting the building code to build from http and
ftp addresses on windows. There's still a bit of an issue with the way
wget handles windows file paths but the perl code is all done I think

Location:
trunk/gsdl/bin/script
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/bin/script/build

    r1709 r1743  
    160160        #  -o = the output file to write download status to (only used if the -out
    161161        #       option was given to build)
     162
    162163        my $download_cmd = "perl -S gsWget.pl -P \"$importdir\" -np -nv";
    163         $download .= " -r -N -l inf -R \"*\?*\"";
     164        $download_cmd .= " -r -N -l inf -R \"*\?*\"";
    164165        $download_cmd .= " -o \"$outfile.download\"" if $use_out;
    165166        $download_cmd .= " \"$download_dir\"";
     
    181182                last;
    182183            } else {
    183                 $file = &util:filename_cat ($importdir, $file);
     184                $file = &util::filename_cat ($importdir, $file);
    184185                if (-d $file) {
    185186                if (opendir (DIR, $file)) {
    186                     my @2files = readdir DIR;
     187                    my @files2 = readdir DIR;
    187188                    closedir DIR;
    188                     foreach my $2file (@2files) {
    189                     if ($2file =~ /^robots.txt$/i) {
    190                         &util::rm (&util::filename_cat ($file, $2file));
     189                    foreach my $file2 (@files2) {
     190                    if ($file2 =~ /^robots.txt$/i) {
     191                        &util::rm (&util::filename_cat ($file, $file2));
    191192                        last;
    192193                    }
  • trunk/gsdl/bin/script/gsWget.pl

    r1533 r1743  
    3131BEGIN {
    3232    die "GSDLHOME not set\n" unless defined $ENV{'GSDLHOME'};
     33    die "GSDLOS not set\n" unless defined $ENV{'GSDLOS'};
    3334    unshift (@INC, "$ENV{'GSDLHOME'}/perllib");
    3435}
    3536
    36 # use version of wet in packages directory if it exists
    37 my $cmd = "$ENV{'GSDLHOME'}/packages/wget/bin/wget";
     37use util;
     38
     39# wget should live in the Greenstone directory structure
     40# we'll bail if we can't find it
     41my $exe = &util::get_os_exe ();
     42my $cmd = &util::filename_cat ($ENV{'GSDLHOME'}, "bin", $ENV{'GSDLOS'}, "wget");
     43$cmd .= $exe;
    3844if (! -e "$cmd") {
    39     $cmd = "wget";
     45    die "gsWget.pl failed: $cmd doesn't exist\n";
    4046}
    4147
Note: See TracChangeset for help on using the changeset viewer.