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
Nurlan
eepm
Commits
76cd41d0
Commit
76cd41d0
authored
Dec 05, 2014
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial eget commit
parent
c042e0b7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
0 deletions
+61
-0
epm-eget
bin/epm-eget
+56
-0
epm-sh-functions
bin/epm-sh-functions
+5
-0
No files found.
bin/epm-eget
0 → 100755
View file @
76cd41d0
#!/bin/sh
# eget - simply shell on wget for loading directories over http
# Example use:
# eget ftp://ftp.altlinux.ru/pub/security/ssl/*
#
# Copyright (C) 2014-2014 Etersoft
# Copyright (C) 2014-2014 Daniil Mikhailov <danil@etersoft.ru>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
WGET
=
"wget -q"
if
echo
"
$1
"
|
grep
-q
"
\(
^ftp://
\|
[^*]
$\
)"
;
then
$WGET
$1
&&
exit
0
fi
URL
=
$(
echo
$1
|
grep
/
$
||
dirname
$1
)
MASK
=
$(
basename
$1
)
MYTMPDIR
=
"
$(
mktemp
-d
)
"
DIRALLFILES
=
"
$MYTMPDIR
/files/"
get_index
(){
INDEX
=
$MYTMPDIR
/index
$WGET
$URL
-O
$INDEX
}
save_temp_files
(){
mkdir
-p
$DIRALLFILES
ALLFILES
=
"
$MYTMPDIR
/allfiles"
cat
$INDEX
|
grep
-o
-E
'href="([^\*/"#]+)"'
|
cut
-d
'"'
-f2
>
$ALLFILES
while
read
line
;
do
touch
$DIRALLFILES
/
$line
done
<
$ALLFILES
}
sort_files
(){
for
line
in
$DIRALLFILES
/
$MASK
;
do
$WGET
$URL
/
`
basename
"
$line
"
`
-P
$CURRENTDIR
/
done
}
get_index
save_temp_files
sort_files
bin/epm-sh-functions
View file @
76cd41d0
...
...
@@ -300,6 +300,11 @@ assure_exists()
__epm_assure
"
$1
"
$package
||
fatal
"Can't assure in '
$1
' command"
}
eget
()
{
$PROGDIR
/epm-eget
"
$@
"
}
# TODO: improve and drop!
get_package_type
()
{
...
...
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