If you do "fetch_url $url/.somefile", fetch_url would return failure,
because "$outdir/*" wouldn't match the file.
Use ls -A (which busybox ls supports) to actually find possible dotfiles
in the created output dir.
Signed-off-by: Will Woods <wwoods@redhat.com>
curl $curl_args --output "$outloc" "$url" || return $?
else
local outdir="$(mkuniqdir /tmp curl_fetch_url)"
- local cwd="$(pwd)"
- cd "$outdir"
- curl $curl_args --remote-name "$url" || return $?
- cd "$cwd"
- outloc="$(echo $outdir/*)"
+ ( cd "$outdir"; curl $curl_args --remote-name "$url" || return $? )
+ outloc="$outdir/$(ls -A $outdir)"
fi
[ -f "$outloc" ] || return 253
echo "$outloc"