mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-02-20 21:46:57 +00:00
abuild: download from DISTFILES_MIRROR first if set
This commit is contained in:
parent
e388eb1467
commit
a0c0ae76e3
13
abuild.in
13
abuild.in
@ -149,12 +149,11 @@ md5check() {
|
||||
|
||||
uri_fetch() {
|
||||
local uri="$1"
|
||||
local d="${s##*/}" # $(basename $s)
|
||||
local d="${uri##*/}" # $(basename $uri)
|
||||
local opts
|
||||
[ -n "$quiet" ] && opts="-q"
|
||||
[ -f "$SRCDEST/$d" ] && return 0
|
||||
|
||||
|
||||
# we need GNU wget for this
|
||||
case "$uri" in
|
||||
https://*) opts="--no-check-certificate";;
|
||||
@ -178,6 +177,16 @@ is_remote() {
|
||||
return 1
|
||||
}
|
||||
|
||||
# try download from file from mirror first
|
||||
uri_fetch_mirror() {
|
||||
local uri="$1"
|
||||
local d="${uri##*/}" # $(basename $uri)
|
||||
if [ -n "$DISTFILES_MIRROR" ]; then
|
||||
uri_fetch "$DISTFILES_MIRROR"/$d && return 0
|
||||
fi
|
||||
uri_fetch "$uri"
|
||||
}
|
||||
|
||||
default_fetch() {
|
||||
local s
|
||||
mkdir -p "$srcdir"
|
||||
|
Loading…
Reference in New Issue
Block a user