Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
eget
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
Ivan Ivlev
eget
Commits
67f65f78
Commit
67f65f78
authored
3 years ago
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eget: concatenate filenames with base url if need
parent
1e314ded
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
eget
eget
+9
-4
No files found.
eget
View file @
67f65f78
...
...
@@ -200,23 +200,28 @@ if echo "$URL" | grep -q "[*?]" ; then
fatal
"Error: there are globbing symbols (*?) in
$URL
"
fi
# If have no wildcard symbol like asterisk, just download
if
echo
"
$MASK
"
|
grep
-qv
"[*?]"
||
echo
"
$MASK
"
|
grep
-q
"[?].*="
;
then
sget
"
$1
"
"
$TARGETFILE
"
exit
fi
is_url
()
{
echo
"
$1
"
|
grep
-q
"://"
}
get_urls
()
{
scat
$URL
|
\
grep
-i
-o
-E
'href="([^\*/"#]
+)"'
|
cut
-d
'"'
-f2
grep
-i
-o
-E
'href="(.
+)"'
|
cut
-d
'"'
-f2
}
if
[
-n
"
$LISTONLY
"
]
;
then
for
fn
in
$(
get_urls | filter_glob
"
$MASK
"
| filter_order
)
;
do
# TODO: return full url? someone use old behaviour?
echo
"
$URL
$(
basename
"
$fn
"
)
"
is_url
"
$fn
"
&&
echo
$fn
&&
continue
fn
=
"
$(
echo
"
$fn
"
|
sed
-e
's|^./||'
-e
's|^/+||'
)
"
echo
"
$URL
/
$fn
"
done
exit
fi
...
...
This diff is collapsed.
Click to expand it.
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