set mirror via env var

This commit is contained in:
Natanael Copa committed 2019-03-06 20:55:07 +01:00
1 parent c524f5d0cb
commit 409d1f0fc5
2 files changed
+6 -3

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ local cqueues = require("cqueues")
local yaml = require("lyaml")
local lfs = require("lfs")
local mirror = "https://cz.alpinelinux.org/alpine"
local mirror = os.getenv("MIRROR") or "https://cz.alpinelinux.org/alpine"
function fatal(...)
errormsg(...)
+5 -2
View File
@@ -1,6 +1,5 @@
#!/bin/sh -e
run_tests() {
local branch="$1"
local dir="$2"
@@ -15,7 +14,11 @@ prepare() {
local branch="$1"
local dir=$(mktemp -d /tmp/docker-brew-alpine-XXXXXX)
docker build -t docker-brew-alpine-fetch .
docker run --user $(id -u) --rm -it -v $dir:/out docker-brew-alpine-fetch $branch /out
docker run \
${MIRROR+ -e "MIRROR=$MIRROR"} \
--user $(id -u) --rm -it \
-v $dir:/out \
docker-brew-alpine-fetch $branch /out
echo "=> Verifying checksums"
( cd $dir && sha512sum -c checksums.sha512)
echo "=> temp dir: $dir"