From b3722c8001827f907c630595a796b5fb01c0672a Mon Sep 17 00:00:00 2001 From: spo Date: Fri, 28 Aug 2015 17:16:52 +0300 Subject: [PATCH] Improve Linux scripts --- config.sh | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/config.sh b/config.sh index 9e4a5113d..cf1ae4a91 100755 --- a/config.sh +++ b/config.sh @@ -6,15 +6,20 @@ echo "#!/bin/bash -ex" >> env_config.sh PLATFORM="" if [ -f PLATFORM ]; then -PLATFORM="$(lsb_release -is)" -RELEASE="$(lsb_release -rs)" -if [ "${PLATFORM}" = 'CentOS' ]; then PLATFORM=-centos -elif [ "${PLATFORM}" = 'Debian' ]; then - if [ "${RELEASE}" = '8.0' ]; then PLATFORM=-d8 - else PLATFORM=-d6 + PLATFORM="$(lsb_release -is)" + RELEASE="$(lsb_release -rs)" + if [ "${PLATFORM}" = 'CentOS' ]; then PLATFORM=-centos + elif [ "${PLATFORM}" = 'Debian' ]; then + if [ "${RELEASE}" = '8.0' ]; then PLATFORM=-d8 + else PLATFORM=-d6 + fi fi fi + +if [ -f DEBUG ]; then + PLATFORM=${PLATFORM}_d fi + echo "export PLATFORM=${PLATFORM}" >> env_config.sh main() { -- 2.39.2