Merge pull request #376 from wincus/develop

Added support to Elementary OS 0.2
This commit is contained in:
Pedro Algarvio 2014-04-24 10:26:45 +01:00
commit 418fbea5d6
2 changed files with 16 additions and 6 deletions

View file

@ -369,7 +369,7 @@ Supported Operating Systems
- SmartOS
- SuSE 11 SP1/11 SP2
- Ubuntu 10.x/11.x/12.x/13.04/13.10
- Elementary OS 0.2

View file

@ -883,7 +883,7 @@ __gather_system_info() {
# functions by pretending to be Ubuntu (i.e. change global vars)
#----------------------------------------------------------------------------------------------------------------------
__ubuntu_derivatives_translation() {
UBUNTU_DERIVATIVES="(trisquel|linuxmint|linaro)"
UBUNTU_DERIVATIVES="(trisquel|linuxmint|linaro|elementary_os)"
# Mappings
trisquel_6_ubuntu_base="12.04"
linuxmint_13_ubuntu_base="12.04"
@ -893,15 +893,25 @@ __ubuntu_derivatives_translation() {
# https://bugs.launchpad.net/linuxmint/+bug/1198751
linuxmint_16_ubuntu_base="13.10"
linaro_12_ubuntu_base="12.04"
elementary_os_02_ubuntu_base="12.04"
# Translate Ubuntu derivatives to their base Ubuntu version
match=$(echo $DISTRO_NAME_L | egrep ${UBUNTU_DERIVATIVES})
if [ "x${match}" != "x" ]; then
_major="$(echo $DISTRO_VERSION | sed 's/^\([0-9]*\).*/\1/g')"
_ubuntu_version="$(eval echo \$${1}_${_major}_ubuntu_base)"
if [ "x$_ubuntu_version" != "x" ]; then
case $match in
"elementary_os")
_major="$(echo $DISTRO_VERSION | sed 's/\.//g')"
;;
*)
_major="$(echo $DISTRO_VERSION | sed 's/^\([0-9]*\).*/\1/g')"
;;
esac
_ubuntu_version="$(eval echo \$${1}_${_major}_ubuntu_base)"
if [ "x$_ubuntu_version" != "x" ]; then
echodebug "Detected Ubuntu $_ubuntu_version derivative"
DISTRO_NAME_L="ubuntu"
DISTRO_VERSION="$_ubuntu_version"