userland-fetch revision 42
18N/A# The contents of this file are subject to the terms of the 18N/A# Common Development and Distribution License (the "License"). 18N/A# You may not use this file except in compliance with the License. 18N/A# See the License for the specific language governing permissions 18N/A# and limitations under the License. 18N/A# When distributing Covered Code, include this CDDL HEADER in each 18N/A# If applicable, add the following below this CDDL HEADER, with the 18N/A# fields enclosed by brackets "[]" replaced with your own identifying 18N/A# information: Portions Copyright [yyyy] [name of copyright owner] 18N/A# Copyright (c) 2010, Oracle and/or it's affiliates. All rights reserved. 18N/A# A simple program similiar to wget(1), but handles local file copy, ignores 18N/A# directories, and verifies file hashes. 18N/A # return the name of the file that we downloaded the data to. 42N/A # filename should always be first 42N/A # command line url is a fallback, so it's last 42N/A print "Usage: %s [-f|--file (file)] [-l|--link] [-h|--hash (hash)] [-s|--search (search-dir)] --url (url)" %
(sys.argv[0].split('/')[-1]) 42N/A ["file=", "link", "hash=", "search=", "url="]) 42N/A print "not found, skipping" 42N/A print "copying...",
42N/A print "linking...",
42N/A print "downloading...",
42N/A print "validating...",