From d312669f9321e2b360f9b6c69016e4f6394b8914 Mon Sep 17 00:00:00 2001 From: gryf Date: Fri, 15 May 2020 19:26:36 +0200 Subject: [PATCH] Fix for leading whitespaces in lsb_release output --- bootstrap.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bootstrap.sh b/bootstrap.sh index 4116843..b85384c 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -11,7 +11,8 @@ set -e if command -v lsb_release 2>&1 > /dev/null; then - DISTRO_ID=$(lsb_release -i | cut -f 2 -d ':' | tr '[:upper:]' '[:lower:]') + DISTRO_ID=$(lsb_release -i | cut -f 2 -d ':' | xargs \ + | tr '[:upper:]' '[:lower:]') DISTRO_R=$(lsb_release -r | awk '{print $2}') else if [[ -e /etc/redhat-release ]]; then