When using snapshots, we can get a redirect and then we don't
recurse. There doesn't seem to be a suitable option for wget, so do
this by hand before we call wget -m.
Signed-off-by: Ian Jackson <iwj@xenproject.org>
# Can't seem to get curl to globs.
rm -rf dtbs
mkdir dtbs
- ( cd dtbs && wget -nv -A README,\*.dtb -nd -nH -np -m $dtbs )
+ dtbs_redir="$(curl -sSI -o /dev/null -w '%{redirect_url}' $dtbs)"
+ if [ "x$dtbs_redir" != x ]; then
+ dtbs=$dtbs_redir
+ echo "Redirected for dtbs, to $dtbs"
+ fi
+ ( cd dtbs && wget -nv -A README,\*.dtb -nd -nH -np -m "$dtbs" )
tar --mtime=./dtbs/README -cf dtbs.tar dtbs
gzip -9nf dtbs.tar
fi