Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
eepm
Commits
4087fb81
Commit
4087fb81
authored
Nov 10, 2017
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix and text install via url with wildcard
parent
b51f3079
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
9 deletions
+20
-9
epm-checkpkg
bin/epm-checkpkg
+1
-0
epm-download
bin/epm-download
+14
-7
epm-info
bin/epm-info
+1
-0
epm-install
bin/epm-install
+1
-0
tools_eget
bin/tools_eget
+3
-2
No files found.
bin/epm-checkpkg
View file @
4087fb81
...
...
@@ -99,6 +99,7 @@ epm_checkpkg()
# TODO: reinvent
[
-n
"
$to_remove_pkg_files
"
]
&&
rm
-fv
$to_remove_pkg_files
[
-n
"
$to_remove_pkg_files
"
]
&&
rmdir
-v
$(
dirname
$to_remove_pkg_files
|
head
-n1
)
2>/dev/null
#fatal "Broken package $pkg"
return
$RETVAL
...
...
bin/epm-download
View file @
4087fb81
...
...
@@ -21,8 +21,10 @@ __use_url_install()
{
case
$DISTRNAME
in
"ALTLinux"
)
#
not for https
#
do not support https yet
echo
"
$pkg_urls
"
|
grep
-q
"https://"
&&
return
1
# force download if wildcard is used
echo
"
$pkg_urls
"
|
grep
-q
"[?*]"
&&
return
1
pkg_names
=
"
$pkg_names
$pkg_urls
"
return
0
;;
...
...
@@ -60,16 +62,21 @@ __download_pkg_urls()
local
url
[
-z
"
$pkg_urls
"
]
&&
return
for
url
in
$pkg_urls
;
do
# TODO: use some individual tmp dir
local
new_file
=
/tmp/
$(
basename
"
$url
"
)
if
docmd eget
-O
$new_file
$url
&&
[
-s
"
$new_file
"
]
;
then
pkg_files
=
"
$pkg_files
$new_file
"
to_remove_pkg_files
=
"
$to_remove_pkg_files
$new_file
"
local
tmppkg
=
$(
mktemp
-d
)
||
fatal
"failed mktemp -d"
cd
$tmppkg
||
fatal
if
docmd eget
"
$url
"
;
then
local
i
for
i
in
$(
basename
$url
)
;
do
[
-s
"
$tmppkg
/
$i
"
]
||
continue
pkg_files
=
"
$pkg_files
$tmppkg
/
$i
"
to_remove_pkg_files
=
"
$to_remove_pkg_files
$tmppkg
/
$i
"
done
else
warning
"Failed to download
$url
, ignoring"
fi
cd
-
>
/dev/null
done
# re
store
# re
construct
pkg_filenames
=
$(
strip_spaces
"
$pkg_files
$pkg_names
"
)
}
...
...
bin/epm-info
View file @
4087fb81
...
...
@@ -150,6 +150,7 @@ local RETVAL=$?
# TODO: reinvent
[
-n
"
$to_remove_pkg_files
"
]
&&
rm
-fv
$to_remove_pkg_files
[
-n
"
$to_remove_pkg_files
"
]
&&
rmdir
-v
$(
dirname
$to_remove_pkg_files
|
head
-n1
)
2>/dev/null
return
$RETVAL
}
bin/epm-install
View file @
4087fb81
...
...
@@ -623,6 +623,7 @@ epm_install()
# TODO: reinvent
[
-n
"
$to_remove_pkg_files
"
]
&&
rm
-fv
$to_remove_pkg_files
[
-n
"
$to_remove_pkg_files
"
]
&&
rmdir
-v
$(
dirname
$to_remove_pkg_files
|
head
-n1
)
2>/dev/null
return
$RETVAL
}
bin/tools_eget
View file @
4087fb81
...
...
@@ -42,7 +42,7 @@ fi
# If ftp protocol or have no asterisk, just download
# TODO: use has()
if
echo
"
$1
"
|
grep
-q
"
\(
^ftp://
\|
[^*]
\)
"
;
then
if
echo
"
$1
"
|
grep
-q
"
^ftp://"
||
echo
"
$1
"
|
grep
-qv
"[*?]
"
;
then
$WGET
$WGET_OPTION_TARGET
"
$1
"
exit
fi
...
...
@@ -73,6 +73,7 @@ create_fake_files()
print_files |
while
read
-r
line
;
do
touch
$DIRALLFILES
/
$(
basename
"
$line
"
)
done
rm
-f
$INDEX
}
download_files
()
...
...
@@ -84,7 +85,7 @@ download_files()
return
$ERROR
}
get_index
||
exit
get_index
||
{
rm
-rf
"
$MYTMPDIR
"
;
exit
;
}
create_fake_files
download_files
||
echo
"There was some download errors"
>
&2
rm
-rf
"
$MYTMPDIR
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment