4 #include "desc-parser.hh"
6 int main (int argc
, char* argv
[])
10 for (int i
= 1; i
< argc
; ++i
)
13 package
.ParsePackage (argv
[i
]);
15 unsigned int no_downloads
= package
.download
.download_infos
.size();
17 for (unsigned int dl
=0; dl
< no_downloads
; dl
++) {
18 DownloadInfo
& info
=package
.download
.download_infos
[dl
];
20 // TODO: Choose type out of mirror and nodist. Not yet
21 // used in tree - and imperfectly implemented in rock ...
22 std::string store_url
= "download/";
23 store_url
+= "mirror/";
24 store_url
+= info
.file
[0];
26 store_url
+= info
.file
;
28 if (info
.protocol
== "http" || info
.protocol
== "ftp") {
29 std::cerr
<< "Would download: " << info
.down_url
30 << " -> " << store_url
<< std::endl
;
33 std::cerr
<< "Error: protocol '" << info
.protocol
34 << "' not yet implemented" << std::endl
;