[SCM] live-build branch, debian, updated. debian/3.0_a42-1-25-g6c98972

Daniel Baumann daniel at debian.org
Mon Feb 6 22:26:21 UTC 2012


The following commit has been merged in the debian branch:
commit 43105e7a2d56ad2ea7feeace3cef410203277a9a
Author: Daniel Baumann <daniel at debian.org>
Date:   Mon Jan 23 13:42:47 2012 +0100

    Autodetecting mode depending on which distribution we're building.

diff --git a/functions/defaults.sh b/functions/defaults.sh
index 97fc601..d4c16d4 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -26,7 +26,28 @@ Set_defaults ()
 	LB_SYSTEM="${LB_SYSTEM:-live}"
 
 	# Setting mode (currently: debian, emdebian, progress, ubuntu and kubuntu)
-	LB_MODE="${LB_MODE:-debian}"
+	if [ -x /usr/bin/lsb_release ]
+	then
+		_DISTRIBUTOR="$(lsb_release -is | tr [A-Z] [a-z])"
+
+		case "${_DISTRIBUTOR}" in
+			debian|progress|ubuntu)
+				LB_MODE="${LB_MODE:-${_DISTRIBUTOR}}"
+				;;
+
+			*)
+				LB_MODE="${LB_MODE:-debian}"
+				;;
+		esac
+	else
+		if [ -e /etc/progress_version ]
+		then
+			LB_MODE="${LB_MODE:-progress}"
+		elif [ -e /etc/ubuntu_version ]
+		then
+			LB_MODE="${LB_MODE:-ubuntu}"
+		fi
+	fi
 
 	# Setting distribution name
 	case "${LB_MODE}" in

-- 
live-build



More information about the debian-live-changes mailing list