Skip to content

Commit

Permalink
Source local config
Browse files Browse the repository at this point in the history
Addresses #9, "Add local config override file". As stated there, this
needs to have distro/package configs in bash associative arrays to
work for overriding package and distro configuration; e.g.

    DISTRO_MIRROR[jessie]=http://http.us.debian.org/debian
  • Loading branch information
zultron committed Apr 10, 2015
1 parent 5bd4993 commit 269e612
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@
/docker/
# apt package repository
/repo/
# local config
/local-config.sh
18 changes: 18 additions & 0 deletions local-config-example.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# dbuild local configuration example
#
# Copy this file to `local-config.sh` and customize for your site
#
# The below examples are intended for many use cases; see
# `scripts/base-config.sh`, `scripts/packages/*.sh` and
# `scripts/distro/*.sh` for more variables to customize

# http/https proxy for package downloads
#HTTP_PROXY=http://192.168.0.42:3128

# Whether to always allocate a tty in Docker (true/false)
#
# A bug in Docker pre-1.1.1 prevents command exit status from the
# `docker run` command when a tty is allocated. Set to `false` if you
# need exit status from Docker.
#DOCKER_ALWAYS_ALLOCATE_TTY=true

5 changes: 5 additions & 0 deletions scripts/init-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,11 @@ if test -n "$PACKAGE"; then
. $PACKAGE_CONFIG_DIR/$PACKAGE.sh
fi

# Source optional config override file
if test -f $BASE_DIR/local-config.sh; then
debug " Sourcing local config"
. $BASE_DIR/local-config.sh
fi

# Debug
! $DDEBUG || set -x
Expand Down

0 comments on commit 269e612

Please sign in to comment.