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
1
Merge Requests
1
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
eecf72fa
Commit
eecf72fa
authored
Feb 08, 2026
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eget: lazy backend detection, only check needed downloaders
parent
dae6be47
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
13 deletions
+33
-13
tools_eget
bin/tools_eget
+33
-13
No files found.
bin/tools_eget
View file @
eecf72fa
...
@@ -1060,15 +1060,9 @@ fi
...
@@ -1060,15 +1060,9 @@ fi
WGET
=
"
$(
print_command_path wget
)
"
CURL
=
"
$(
print_command_path curl
)
"
ARIA2
=
"
$(
print_command_path aria2
)
"
AXEL
=
"
$(
print_command_path axel
)
"
RSYNC
=
"
$(
print_command_path rsync
)
"
ORIG_EGET_BACKEND
=
"
$EGET_BACKEND
"
ORIG_EGET_BACKEND
=
"
$EGET_BACKEND
"
# override backend
# override backend
by URL type
if
is_fileurl
"
$1
"
;
then
if
is_fileurl
"
$1
"
;
then
EGET_BACKEND
=
"file"
EGET_BACKEND
=
"file"
elif
is_ipfsurl
"
$1
"
;
then
elif
is_ipfsurl
"
$1
"
;
then
...
@@ -1078,16 +1072,22 @@ elif is_rsyncurl "$1" || is_sshurl "$1" ; then
...
@@ -1078,16 +1072,22 @@ elif is_rsyncurl "$1" || is_sshurl "$1" ; then
fi
fi
orig_EGET_BACKEND
=
"
$EGET_BACKEND
"
orig_EGET_BACKEND
=
"
$EGET_BACKEND
"
EGET_BACKEND
=
"
$
(
basename
"
$EGET_BACKEND
"
)
"
EGET_BACKEND
=
"
$
{
EGET_BACKEND
##*/
}
"
# lazy backend detection: only check what we actually need
case
"
$orig_EGET_BACKEND
"
in
case
"
$orig_EGET_BACKEND
"
in
file|ipfs|rsync
)
file|ipfs
)
;;
rsync
)
RSYNC
=
"
$(
print_command_path rsync
)
"
[
-n
"
$RSYNC
"
]
||
fatal
"There are no rsync in the system. Install it with
$
epm install rsync"
;;
;;
*
/wget
)
*
/wget
)
WGET
=
"
$orig_EGET_BACKEND
"
WGET
=
"
$orig_EGET_BACKEND
"
[
-x
"
$WGET
"
]
||
fatal
"There are no
$orig_EGET_BACKEND
in the system but you forced using it via EGET_BACKEND. Install it with
$
epm install wget"
[
-x
"
$WGET
"
]
||
fatal
"There are no
$orig_EGET_BACKEND
in the system but you forced using it via EGET_BACKEND. Install it with
$
epm install wget"
;;
;;
wget
)
wget
)
WGET
=
"
$(
print_command_path wget
)
"
[
-n
"
$WGET
"
]
||
fatal
"There are no wget in the system but you forced using it via EGET_BACKEND. Install it with
$
epm install wget"
[
-n
"
$WGET
"
]
||
fatal
"There are no wget in the system but you forced using it via EGET_BACKEND. Install it with
$
epm install wget"
;;
;;
*
/curl
)
*
/curl
)
...
@@ -1095,29 +1095,49 @@ case "$orig_EGET_BACKEND" in
...
@@ -1095,29 +1095,49 @@ case "$orig_EGET_BACKEND" in
[
-x
"
$CURL
"
]
||
fatal
"There are no
$orig_EGET_BACKEND
in the system but you forced using it via EGET_BACKEND. Install it with
$
epm install curl"
[
-x
"
$CURL
"
]
||
fatal
"There are no
$orig_EGET_BACKEND
in the system but you forced using it via EGET_BACKEND. Install it with
$
epm install curl"
;;
;;
curl
)
curl
)
CURL
=
"
$(
print_command_path curl
)
"
[
-n
"
$CURL
"
]
||
fatal
"There are no curl in the system but you forced using it via EGET_BACKEND. Install it with
$
epm install curl"
[
-n
"
$CURL
"
]
||
fatal
"There are no curl in the system but you forced using it via EGET_BACKEND. Install it with
$
epm install curl"
;;
;;
*
/aria2
)
*
/aria2
)
ARIA2
=
"
$orig_EGET_BACKEND
"
ARIA2
=
"
$orig_EGET_BACKEND
"
[
-x
"
$ARIA2
"
]
||
fatal
"There are no
$orig_EGET_BACKEND
in the system but you forced using it via EGET_BACKEND. Install it with
$
epm install aria2"
[
-x
"
$ARIA2
"
]
||
fatal
"There are no
$orig_EGET_BACKEND
in the system but you forced using it via EGET_BACKEND. Install it with
$
epm install aria2"
# aria2 needs wget for headers and stdout
WGET
=
"
$(
print_command_path wget
)
"
;;
;;
aria2
)
aria2
)
ARIA2
=
"
$(
print_command_path aria2
)
"
[
-n
"
$ARIA2
"
]
||
fatal
"There are no aria2 in the system but you forced using it via EGET_BACKEND. Install it with
$
epm install aria2"
[
-n
"
$ARIA2
"
]
||
fatal
"There are no aria2 in the system but you forced using it via EGET_BACKEND. Install it with
$
epm install aria2"
# aria2 needs wget for headers and stdout
WGET
=
"
$(
print_command_path wget
)
"
;;
;;
*
/axel
)
*
/axel
)
AXEL
=
"
$orig_EGET_BACKEND
"
AXEL
=
"
$orig_EGET_BACKEND
"
[
-x
"
$AXEL
"
]
||
fatal
"There are no
$orig_EGET_BACKEND
in the system but you forced using it via EGET_BACKEND. Install it with
$
epm install axel"
[
-x
"
$AXEL
"
]
||
fatal
"There are no
$orig_EGET_BACKEND
in the system but you forced using it via EGET_BACKEND. Install it with
$
epm install axel"
# axel needs wget for headers and stdout
WGET
=
"
$(
print_command_path wget
)
"
;;
;;
axel
)
axel
)
AXEL
=
"
$(
print_command_path axel
)
"
[
-n
"
$AXEL
"
]
||
fatal
"There are no axel in the system but you forced using it via EGET_BACKEND. Install it with
$
epm install axel"
[
-n
"
$AXEL
"
]
||
fatal
"There are no axel in the system but you forced using it via EGET_BACKEND. Install it with
$
epm install axel"
# axel needs wget for headers and stdout
WGET
=
"
$(
print_command_path wget
)
"
;;
;;
''
)
''
)
[
-n
"
$WGET
"
]
&&
EGET_BACKEND
=
"wget"
# default: try wget first, then curl
[
-z
"
$EGET_BACKEND
"
]
&&
[
-n
"
$CURL
"
]
&&
EGET_BACKEND
=
"curl"
WGET
=
"
$(
print_command_path wget
)
"
[
-n
"
$EGET_BACKEND
"
]
||
fatal
"There are no wget nor curl in the system. Install something with
$
epm install wget"
if
[
-n
"
$WGET
"
]
;
then
EGET_BACKEND
=
"wget"
else
CURL
=
"
$(
print_command_path curl
)
"
if
[
-n
"
$CURL
"
]
;
then
EGET_BACKEND
=
"curl"
else
fatal
"There are no wget nor curl in the system. Install something with
$
epm install wget"
fi
fi
;;
;;
*
)
*
)
fatal
"Uknown EGET_BACKEND
$EGET_BACKEND
"
fatal
"U
n
known EGET_BACKEND
$EGET_BACKEND
"
;;
;;
esac
esac
...
...
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