Merge "Add switch to turn on caching for debian element."
This commit is contained in:
commit
2afe36eca8
@ -10,3 +10,7 @@ and pass it in via `DIB_DISTRIBUTION_MIRROR`.
|
|||||||
Use of this element will also require the tool 'debootstrap' to be
|
Use of this element will also require the tool 'debootstrap' to be
|
||||||
available on your system. It should be available on Ubuntu, Debian,
|
available on your system. It should be available on Ubuntu, Debian,
|
||||||
and Fedora.
|
and Fedora.
|
||||||
|
|
||||||
|
The `DIB_OFFLINE` or more specific `DIB_DEBIAN_USE_DEBOOTSTRAP_CACHE`
|
||||||
|
variables can be set to prefer the use of a pre-cached root filesystem
|
||||||
|
tarball.
|
||||||
|
@ -32,7 +32,7 @@ DIB_DISTRIBUTION_MIRROR=${DIB_DISTRIBUTION_MIRROR:-http://http.debian.net/debian
|
|||||||
http_proxy=${http_proxy:-}
|
http_proxy=${http_proxy:-}
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
if [ -n "$DIB_OFFLINE" ] && [ -f $DEBOOTSTRAP_TARBALL ] ; then
|
if [ -n "$DIB_OFFLINE" -o -n "${DIB_DEBIAN_USE_DEBOOTSTRAP_CACHE:-}" ] && [ -f $DEBOOTSTRAP_TARBALL ] ; then
|
||||||
echo $DEBOOTSTRAP_TARBALL found in cache. Using.
|
echo $DEBOOTSTRAP_TARBALL found in cache. Using.
|
||||||
sudo tar -C $TARGET_ROOT --numeric-owner -xzf $DEBOOTSTRAP_TARBALL
|
sudo tar -C $TARGET_ROOT --numeric-owner -xzf $DEBOOTSTRAP_TARBALL
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user