Check for fetch failure

git-svn-id: https://svn.macports.org/repository/macports/trunk/base@14 d073be05-634f-4543-b044-5fe20cf6d1d6
This commit is contained in:
Landon Fuller
2002-08-01 02:46:35 +00:00
parent 2da9eff2ba
commit 2329682f47
+4
View File
@@ -42,9 +42,13 @@ proc portfetch::checkfiles {args} {
puts "Attempting to fetch from $site"
catch {exec curl -o ${distpath}/${distfile} ${site}${distfile} >&@ stdout} result
if {$result == 0} {
set fetched 1
break
}
}
if {![info exists fetched]} {
return -1
}
}
return 0
}