From abc3a0ee2d6bccb23c11bb0a4d676ff04bd46d09 Mon Sep 17 00:00:00 2001 From: Jonathon Anderson Date: Mon, 3 Feb 2025 17:59:08 -0700 Subject: [PATCH] Fix detection of OS The previous method broke on ubuntu, where the value of ID was not quoted in `/etc/os-release`. This broke tests that depended on paths set on known OSes. Signed-off-by: Jonathon Anderson --- Variables.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Variables.mk b/Variables.mk index 8926e230..f6394dd1 100644 --- a/Variables.mk +++ b/Variables.mk @@ -1,7 +1,7 @@ -include Defaults.mk # Linux distro (try and set to /etc/os-release ID) -OS_REL := $(shell sed -n "s/^ID\s*=\s*['"\""]\(.*\)['"\""]/\1/p" /etc/os-release) +OS_REL := $(shell sh -c '. /etc/os-release; echo $ID') OS ?= $(OS_REL) ARCH_REL := $(shell uname -p)