diff options
author | Daniel Baumann <daniel@debian.org> | 2011-09-01 09:27:16 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-09-01 09:27:29 +0200 |
commit | ef53525970f0d3d9410e8a356fc9170cbead016a (patch) | |
tree | e2a653dc1dff07682f6ec7a7d72da979fcaed8b2 | |
parent | 3cf8c4bb2232f5f1f0b032480518853a8c798056 (diff) | |
download | vyos-live-build-ef53525970f0d3d9410e8a356fc9170cbead016a.tar.gz vyos-live-build-ef53525970f0d3d9410e8a356fc9170cbead016a.zip |
Automatically using an embedded live-build copy from within the config tree at local/live-build, if existing.
This allows to ship (an almost) self contained config tree.
-rwxr-xr-x | functions/defaults.sh | 10 | ||||
-rwxr-xr-x | scripts/build.sh | 10 |
2 files changed, 18 insertions, 2 deletions
diff --git a/functions/defaults.sh b/functions/defaults.sh index ae8b7af26..643123c89 100755 --- a/functions/defaults.sh +++ b/functions/defaults.sh @@ -12,7 +12,15 @@ Set_defaults () { ## config/common - LB_BASE="${LB_BASE:-/usr/share/live/build}" + if [ -e local/live-build ] + then + LB_BASE="${LB_BASE:-${PWD}/local/live-build}" + PATH="${PWD}/local/live-build/scripts/build:${PATH}" + export LB_BASE PATH + else + LB_BASE="${LB_BASE:-/usr/share/live/build}" + export LB_BASE + fi # Setting mode (currently: debian, emdebian, progress, ubuntu and kubuntu) LB_MODE="${LB_MODE:-debian}" diff --git a/scripts/build.sh b/scripts/build.sh index 443e9eed9..74898d473 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,6 +1,14 @@ #!/bin/sh -LB_BASE="${LB_BASE:-/usr/share/live/build}" +if [ -e local/live-build ] +then + LB_BASE="${LB_BASE:-${PWD}/local/live-build}" + PATH="${PWD}/local/live-build/scripts/build:${PATH}" + export LB_BASE PATH +else + LB_BASE="${LB_BASE:-/usr/share/live/build}" + export LB_BASE +fi # Source global functions for FUNCTION in "${LB_BASE}"/functions/*.sh |