From 05fc29712f66378e80353397787ec57921fc0cdd Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Sun, 5 Sep 2021 11:19:54 +0200 Subject: [PATCH] ci/build.sh: use /etc/os-release if and only if it exists An upcoming MR will introduce Cygwin builds that also do not have /etc/os-release. --- ci/build.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ci/build.sh b/ci/build.sh index 77f926f6a..009048827 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -4,10 +4,7 @@ set -x set -e set -o pipefail -if [ "$( uname -s )" = "Darwin" ]; then - ID=$( uname -s ) - VERSION_ID=$( uname -r ) -else +if [ -f /etc/os-release ]; then cat /etc/os-release . /etc/os-release if [ -z ${ID_LIKE:+x} ]; then @@ -15,6 +12,9 @@ else ID_LIKE=${ID} fi fi +else + ID=$( uname -s ) + VERSION_ID=$( uname -r ) fi COLLECTION=$( cat COLLECTION ) META_DATA_DIR=Metadata/${COLLECTION}/${ID}/${VERSION_ID} -- 2.40.0