Changeset 12


Ignore:
Timestamp:
Aug 1, 2002, 12:21:57 AM (17 years ago)
Author:
landonf (Landon Fuller)
Message:

Work with global variables exported by darwinports API

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/Tcl/portfetch.1.0.tcl

    r2 r12  
    2828
    2929proc portfetch::checkfiles {args} {
    30         global portpath distname master_sites
    31 
    32         # XXX This doesn't really belong here
    33         set distdir $portpath/distfiles/
     30        global portpath distname master_sites distpath
    3431
    3532        # Set distfile with proper suffix
    3633        set distfile [portfetch::suffix $distname]
    3734
    38         if {![file isdirectory $distdir]} {
    39                 file mkdir $distdir
     35        if {![file isdirectory $distpath]} {
     36                file mkdir $distpath
    4037        }
    4138
    42         if {![file isfile $distdir/$distfile]} {
    43                 puts "$distfile doesn't seem to exist in $distdir"
     39        if {![file isfile $distpath/$distfile]} {
     40                puts "$distfile doesn't seem to exist in $distpath"
    4441                foreach site $master_sites {
    4542                        puts "Attempting to fetch from $site"
    46                         catch {exec curl -o ${distdir}/${distfile} ${site}${distfile} >&@ stdout} result
     43                        catch {exec curl -o ${distpath}/${distfile} ${site}${distfile} >&@ stdout} result
    4744                        if {$result == 0} {
    4845                                break
Note: See TracChangeset for help on using the changeset viewer.