Commit eaab6692 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm download __download_pkg_urls(): allow download any files

parent 469277cc
...@@ -68,6 +68,7 @@ __download_pkg_urls() ...@@ -68,6 +68,7 @@ __download_pkg_urls()
[ -z "$pkg_urls" ] && return [ -z "$pkg_urls" ] && return
for url in $pkg_urls ; do for url in $pkg_urls ; do
local tmppkg="$(mktemp -d)" || fatal "failed mktemp -d" local tmppkg="$(mktemp -d)" || fatal "failed mktemp -d"
remove_on_exit "$tmppkg"
docmd chmod $verbose a+rX $tmppkg docmd chmod $verbose a+rX $tmppkg
showcmd cd $tmppkg showcmd cd $tmppkg
cd $tmppkg || fatal cd $tmppkg || fatal
...@@ -77,11 +78,10 @@ __download_pkg_urls() ...@@ -77,11 +78,10 @@ __download_pkg_urls()
# download packages # download packages
if docmd eget $latest "$url" ; then if docmd eget $latest "$url" ; then
local i local i
for i in *.* ; do for i in * ; do
[ -s "$tmppkg/$i" ] || continue [ -s "$tmppkg/$i" ] || continue
chmod $verbose a+r "$tmppkg/$i" chmod $verbose a+r "$tmppkg/$i"
[ -n "$pkg_files" ] && pkg_files="$pkg_files $tmppkg/$i" || pkg_files="$tmppkg/$i" [ -n "$pkg_files" ] && pkg_files="$pkg_files $tmppkg/$i" || pkg_files="$tmppkg/$i"
remove_on_exit "$tmppkg/$i"
done done
else else
warning "Failed to download $url, ignoring" warning "Failed to download $url, ignoring"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment