Mirror option to set packages repo when building images

This commit is contained in:
Bob Mottram 2016-01-28 11:25:45 +00:00
parent de97e32c36
commit 016ab6388f
1 changed files with 10 additions and 1 deletions

View File

@ -93,6 +93,9 @@ SSH_PORT=2222
# Whether sites are accessible only within a Tor browser
ONION_ONLY="no"
# Where to fetch packages
MIRROR='http://httpredir.debian.org/debian'
mesh_router_setup_script() {
# create a setup script for a mesh router
mesh_script_filename=$1
@ -205,6 +208,10 @@ case $key in
shift
PROJECT_REPO="$1"
;;
-m|--mirror)
shift
MIRROR="$1"
;;
*)
# unknown option
;;
@ -290,7 +297,9 @@ make $IMAGE_TYPE \
SSH_PORT="$SSH_PORT" \
ONION_ONLY="$ONION_ONLY" \
IMAGE_NAME="$IMAGE_NAME" \
PROJECT_REPO="$PROJECT_REPO"
PROJECT_REPO="$PROJECT_REPO" \
MIRROR="$MIRROR" \
BUILD_MIRROR="$MIRROR"
if [ ! "$?" = "0" ]; then
echo $'Build failed'