You've already forked macports-base
mirror of
https://github.com/macports/macports-base.git
synced 2026-07-12 18:18:43 -07:00
Work with global variables exported by darwinports API
git-svn-id: https://svn.macports.org/repository/macports/trunk/base@12 d073be05-634f-4543-b044-5fe20cf6d1d6
This commit is contained in:
@@ -27,23 +27,20 @@ proc portfetch::suffix {distname} {
|
||||
}
|
||||
|
||||
proc portfetch::checkfiles {args} {
|
||||
global portpath distname master_sites
|
||||
|
||||
# XXX This doesn't really belong here
|
||||
set distdir $portpath/distfiles/
|
||||
global portpath distname master_sites distpath
|
||||
|
||||
# Set distfile with proper suffix
|
||||
set distfile [portfetch::suffix $distname]
|
||||
|
||||
if {![file isdirectory $distdir]} {
|
||||
file mkdir $distdir
|
||||
if {![file isdirectory $distpath]} {
|
||||
file mkdir $distpath
|
||||
}
|
||||
|
||||
if {![file isfile $distdir/$distfile]} {
|
||||
puts "$distfile doesn't seem to exist in $distdir"
|
||||
if {![file isfile $distpath/$distfile]} {
|
||||
puts "$distfile doesn't seem to exist in $distpath"
|
||||
foreach site $master_sites {
|
||||
puts "Attempting to fetch from $site"
|
||||
catch {exec curl -o ${distdir}/${distfile} ${site}${distfile} >&@ stdout} result
|
||||
catch {exec curl -o ${distpath}/${distfile} ${site}${distfile} >&@ stdout} result
|
||||
if {$result == 0} {
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user