diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2016-08-20 20:25:13 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2016-09-02 11:59:42 +0200 |
commit | 5d39eb69ac6e116fbe0f7fb28f3eb3287ece4eea (patch) | |
tree | eeb4ba3a2f3b5da9b1d016d839282273f7ebfcc7 /bin/ptxdist | |
parent | cb147d4048f00a81b8d029972a2fcbcdac8fe0f3 (diff) | |
download | ptxdist-5d39eb69ac6e116fbe0f7fb28f3eb3287ece4eea.tar.gz ptxdist-5d39eb69ac6e116fbe0f7fb28f3eb3287ece4eea.tar.xz |
ptxdist: add urlcheck command
Checking if an archive is available without downloading it is difficult and
not 100 percent reliable. For best result curl needs to fail for error http
status codes (--fail) and follow redirects (--location). A HEAD request
(--head) is used to avoid downloading the whole file, but we send a GET
anyways (--request GET) because some servers don't allow HEAD requests.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'bin/ptxdist')
-rwxr-xr-x | bin/ptxdist | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/ptxdist b/bin/ptxdist index a4060806a..7a07ecdfe 100755 --- a/bin/ptxdist +++ b/bin/ptxdist @@ -970,6 +970,7 @@ Build Actions: go start building the current project get get all package sources + urlcheck check package URL for all packages get <package> get package sources extract <package> extract package @@ -981,6 +982,7 @@ Build Actions: autobuild search for "autobuild" scripts and run them drop <package>.<stage> mark a stage of a package as unbuilt tags <package> try to build tags for the package + urlcheck <package> check if the package URL still works images build images for target system image <image> build the specified image @@ -1938,16 +1940,16 @@ EOF ptxd_make_log export_src EXPORTDIR="${1}" exit ;; - get) + get|urlcheck) declare -a pkgs check_premake_compiler && if [ ${#} -eq 0 ]; then - ptxd_make_log get + ptxd_make_log "${cmd}" else check_if_selected "${@}" && pkgs=( "${@/#/${STATEDIR}/}" ) && - ptxd_make_log "${pkgs[@]/%/.get}" + ptxd_make_log "${pkgs[@]/%/.${cmd}}" fi exit ;; |