summaryrefslogtreecommitdiffstats
path: root/core/includes
diff options
context:
space:
mode:
authorJonathan Bauer2018-02-27 15:01:17 +0100
committerJonathan Bauer2018-02-27 15:01:17 +0100
commit0691dac218d6e678f193ea159fd8f3f9d7fd5807 (patch)
tree6d97040a137559cd6d02350920be038956b61153 /core/includes
parent[kernel-vanilla] add libssl-dev (diff)
downloadmltk-0691dac218d6e678f193ea159fd8f3f9d7fd5807.tar.gz
mltk-0691dac218d6e678f193ea159fd8f3f9d7fd5807.tar.xz
mltk-0691dac218d6e678f193ea159fd8f3f9d7fd5807.zip
add '--force-sys-version' option
used to test on new distro versions by overriding lsb_release output (e.g. test ubuntu 17.10's configs on 18.04)
Diffstat (limited to 'core/includes')
-rw-r--r--core/includes/distribution.inc6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/includes/distribution.inc b/core/includes/distribution.inc
index 57bafdf2..e64ace1f 100644
--- a/core/includes/distribution.inc
+++ b/core/includes/distribution.inc
@@ -26,7 +26,11 @@ detect_distribution () {
;;
esac
# Get version - we mangle this quite a bit. first make sure it has no spaces, then split version at period (.), underscore (_) and dash (-)
- SYS_VERSION=$(lsb_release -rs | tolower)
+ if [ -n "$FORCE_SYS_VERSION" ]; then
+ SYS_VERSION="$FORCE_SYS_VERSION"
+ else
+ SYS_VERSION=$(lsb_release -rs | tolower)
+ fi
SYS_CODENAME=$(lsb_release -c|cut -f 2) # Codename: eg. Ubuntu raring, openSuse: Dartmouth etc.
local VERSION=$(echo $SYS_VERSION | sed -r 's/\s//g;s/[\._]/ /g;s/-//g')
local STRTMP=""