[SCM] live-helper branch, master, updated. 1.0.5-2-34-g7ae9881

Daniel Baumann daniel at debian.org
Wed Oct 21 11:18:48 UTC 2009


The following commit has been merged in the master branch:
commit 7ae98817911cf74ab0a93a25717aacca2307eb4b
Author: Daniel Baumann <daniel at debian.org>
Date:   Wed Oct 21 13:12:48 2009 +0200

    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.

diff --git a/functions.sh b/functions.sh
index 2ef04bb..547000a 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
diff --git a/helpers/lh_config b/helpers/lh_config
index b9114bf..9cbabf6 100755
--- a/helpers/lh_config
+++ b/helpers/lh_config
@@ -210,6 +210,11 @@ Local_arguments ()
 					rmdir --ignore-fail-on-non-empty config
 				fi
 
+				if [ -d scripts/functions ]
+				then
+					rmdir --ignore-fail-on-non-empty scripts/functions
+				fi
+
 				if [ -d scripts ]
 				then
 					rmdir --ignore-fail-on-non-empty scripts

-- 
live-helper



More information about the debian-live-changes mailing list