index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
author | Eli Schwartz <eschwartz@archlinux.org> | 2020-05-24 19:32:38 -0400 |
---|---|---|
committer | Levente Polyak <anthraxx@archlinux.org> | 2021-01-27 00:56:48 +0100 |
commit | 99c2020d47aea5409212e54d505a8d285057021d (patch) | |
tree | f0d80df58c665263ea11dadbe5bacf4cea819874 | |
parent | 00f7a6a415ee1f0e3fbb80eca833d84492fb8176 (diff) |
-rwxr-xr-x | makerepropkg.in | 9 |
diff --git a/makerepropkg.in b/makerepropkg.in index 62ba5f3..2a8745c 100755 --- a/makerepropkg.in +++ b/makerepropkg.in @@ -57,9 +57,15 @@ parse_buildinfo() { get_pkgfile() { local cdir=${cache_dirs[0]} local pkgfilebase=${1} + local mode=${2} local pkgname=${pkgfilebase%-*-*-*} local pkgfile ext + # try without downloading + if [[ ${mode} != localonly ]] && get_pkgfile "${pkgfilebase}" localonly; then + return 0 + fi + for ext in .zst .xz ''; do pkgfile=${pkgfilebase}.pkg.tar${ext} @@ -72,6 +78,9 @@ get_pkgfile() { for f in "${pkgfile}" "${pkgfile}.sig"; do if [[ ! -f "${cdir}/${f}" ]]; then + if [[ ${mode} = localonly ]]; then + continue 2 + fi msg2 "retrieving '%s'..." "${f}" >&2 curl -Llf -# -o "${cdir}/${f}" "${archiveurl}/${pkgname:0:1}/${pkgname}/${f}" || continue 2 fi |