[SCM] live-build branch, debian-next, updated. debian/3.0_a42-1-8-ga9ff55b
Daniel Baumann
daniel at debian.org
Mon Jan 23 12:43:19 UTC 2012
The following commit has been merged in the debian-next branch:
commit a9ff55bc77040cbd91c33b36b54fe36e7ebdcd33
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