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
facfa054
Commit
facfa054
authored
Mar 29, 2021
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools_eget: improve error handling
parent
7a2738c7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
tools_eget
bin/tools_eget
+14
-2
No files found.
bin/tools_eget
View file @
facfa054
...
@@ -69,6 +69,7 @@ scat()
...
@@ -69,6 +69,7 @@ scat()
{
{
$CURL
-L
$CURLQ
"
$1
"
$CURL
-L
$CURLQ
"
$1
"
}
}
# download to default name of to $2
# download to default name of to $2
sget
()
sget
()
{
{
...
@@ -163,14 +164,21 @@ if echo "$1" | grep -q "^https://github.com/" && ! echo "$1" | grep -q "/release
...
@@ -163,14 +164,21 @@ if echo "$1" | grep -q "^https://github.com/" && ! echo "$1" | grep -q "/release
MASK
=
"
$2
"
MASK
=
"
$2
"
if
[
-n
"
$LISTONLY
"
]
;
then
if
[
-n
"
$LISTONLY
"
]
;
then
get_github_urls
"
$1
"
| filter_glob
"
$MASK
"
| filter_order
fn
=
''
for
fn
in
$(
get_github_urls
"
$1
"
| filter_glob
"
$MASK
"
| filter_order
)
;
do
echo
"
$fn
"
done
test
-n
"
$fn
"
exit
exit
fi
fi
ERROR
=
0
fn
=
''
for
fn
in
$(
get_github_urls
"
$1
"
| filter_glob
"
$MASK
"
| filter_order
)
;
do
for
fn
in
$(
get_github_urls
"
$1
"
| filter_glob
"
$MASK
"
| filter_order
)
;
do
sget
"
$fn
"
||
ERROR
=
1
sget
"
$fn
"
||
ERROR
=
1
done
done
exit
test
-n
"
$fn
"
||
ERROR
=
1
exit
$ERROR
fi
fi
...
@@ -206,16 +214,20 @@ get_urls()
...
@@ -206,16 +214,20 @@ get_urls()
}
}
if
[
-n
"
$LISTONLY
"
]
;
then
if
[
-n
"
$LISTONLY
"
]
;
then
fn
=
''
for
fn
in
$(
get_urls | filter_glob
"
$MASK
"
| filter_order
)
;
do
for
fn
in
$(
get_urls | filter_glob
"
$MASK
"
| filter_order
)
;
do
# TODO: return full url? someone use old behaviour?
# TODO: return full url? someone use old behaviour?
echo
"
$(
basename
"
$fn
"
)
"
echo
"
$(
basename
"
$fn
"
)
"
done
done
test
-n
"
$fn
"
exit
exit
fi
fi
ERROR
=
0
ERROR
=
0
fn
=
''
for
fn
in
$(
get_urls | filter_glob
"
$MASK
"
| filter_order
)
;
do
for
fn
in
$(
get_urls | filter_glob
"
$MASK
"
| filter_order
)
;
do
sget
"
$URL
/
$(
basename
"
$fn
"
)
"
||
ERROR
=
1
sget
"
$URL
/
$(
basename
"
$fn
"
)
"
||
ERROR
=
1
done
done
test
-n
"
$fn
"
||
ERROR
=
1
exit
$ERROR
exit
$ERROR
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