summaryrefslogtreecommitdiff
path: root/functions.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2009-10-21 13:12:48 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:09:47 +0100
commita87d976add27e00de34b6f1ed19021ed012b3620 (patch)
tree42d0ae7f50b67a74bbe24f69d4ac40673b81fb30 /functions.sh
parente94c40088753c02e5192db837723be3ce91cb07e (diff)
downloadvyos-live-build-a87d976add27e00de34b6f1ed19021ed012b3620.tar.gz
vyos-live-build-a87d976add27e00de34b6f1ed19021ed012b3620.zip
Allow to overload global functions with local functions stored in the config tree at scripts/functions.
live-helper 1.0.6 will be the last release of live-helper 1.x, which will produce lenny 5.0.3 release images. However, when 5.0.4 is due, we'll need to produce new images with slightly modified functions/release.sh files. In order to acchieve that, we'll allow to have such a file overload the functions shipped in live-helper. This way, we can acchieve that: * live-helper itself doesn't need to be updated through stable updates anymore. * we still can do the required changes for a new point release. * we even ship the changes in the source tarballs automatically.
Diffstat (limited to 'functions.sh')
-rwxr-xr-xfunctions.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/functions.sh b/functions.sh
index 2ef04bb77..547000a6c 100755
--- a/functions.sh
+++ b/functions.sh
@@ -2,7 +2,17 @@
LH_BASE="${LH_BASE:-/usr/share/live-helper}"
+# Source global functions
for FUNCTION in "${LH_BASE}"/functions/*.sh
do
. "${FUNCTION}"
done
+
+# Source local functions
+if [ -d scripts/functions ]
+then
+ for FUNCTION in scripts/functions/*.sh
+ do
+ . "${FUNCTION}"
+ done
+fi