Some changes to know if a file was downloaded successfully or not.
Improved xbps-repo sync/add and xbps-fetch to print informative messages when a transfer was not necessary because local/remote size and/or mtime matched. --HG-- extra : convert_revision : xtraeme%40gmail.com-20091124050326-owez7140fdxwepuk
This commit is contained in:
@@ -33,9 +33,11 @@ main(int argc, char **argv)
|
||||
usage();
|
||||
|
||||
rv = xbps_fetch_file(argv[0], ".", false, flags);
|
||||
if (rv != 0) {
|
||||
if (rv == -1) {
|
||||
printf("%s: %s\n", argv[0], xbps_fetch_error_string());
|
||||
exit(EXIT_FAILURE);
|
||||
} else if (rv == 0) {
|
||||
printf("%s: file is identical than remote.\n", argv[0]);
|
||||
}
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
Reference in New Issue
Block a user