summaryrefslogtreecommitdiff
path: root/functions/defaults.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2012-07-19 19:37:26 +0200
committerDaniel Baumann <daniel@debian.org>2012-07-19 21:11:59 +0200
commit8473b925fd94fdb7bb1ae6309a4ab58d490382c9 (patch)
tree94b76a6288395e37619b900f3eea2009a25d9b28 /functions/defaults.sh
parent6c0ddb7d6d72d15ab2887a4b40de2c5d71f26d3a (diff)
downloadvyos-live-build-8473b925fd94fdb7bb1ae6309a4ab58d490382c9.tar.gz
vyos-live-build-8473b925fd94fdb7bb1ae6309a4ab58d490382c9.zip
Fixing up inclusion of functions while allowing local usage of live-build with different file layouts.
Diffstat (limited to 'functions/defaults.sh')
-rwxr-xr-xfunctions/defaults.sh21
1 files changed, 14 insertions, 7 deletions
diff --git a/functions/defaults.sh b/functions/defaults.sh
index 5e06c485f..c9b9e00fe 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -14,12 +14,9 @@ Set_defaults ()
if [ -e local/live-build ]
then
- LB_BASE="${LB_BASE:-${PWD}/local/live-build}"
+ LIVE_BUILD="${LIVE_BUILD:-${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
+ export LIVE_BUILD PATH
fi
# Setting system type
@@ -322,10 +319,20 @@ Set_defaults ()
esac
# Setting includes
- LB_INCLUDES="${LB_INCLUDES:-${LB_BASE}/includes}"
+ if [ -n "${LIVE_BUID}" ]
+ then
+ LB_INCLUDES="${LB_INCLUDES:-${LIVE_BUILD}/includes}"
+ else
+ LB_INCLUDES="${LB_INCLUDES:-/usr/share/live/build/includes}"
+ fi
# Setting templates
- LB_TEMPLATES="${LB_TEMPLATES:-${LB_BASE}/templates}"
+ if [ -n "${LIVE_BUID}" ]
+ then
+ LB_TEMPLATES="${LB_TEMPLATES:-${LIVE_BUILD}/templates}"
+ else
+ LB_TEMPLATES="${LB_TEMPLATES:-/usr/share/live/build/templates}"
+ fi
# Setting live build options
_BREAKPOINTS="${_BREAKPOINTS:-false}"