mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
build: Pick first field in ID_LIKE
CentOS Stream has:
ID_LIKE="rhel fedora"
which confused the existing script. If there are multiple "likes"
arbitrarily pick the first one in the list.
Fixes: commit 63b722b6c0
This commit is contained in:
@@ -106,11 +106,11 @@ AC_ARG_WITH([distro],
|
||||
cat /etc/os-release >&AS_MESSAGE_LOG_FD
|
||||
DISTRO="$(
|
||||
. /etc/os-release
|
||||
if test -n "$ID_LIKE"; then
|
||||
echo $ID_LIKE | tr '@<:@:lower:@:>@' '@<:@:upper:@:>@'
|
||||
else
|
||||
echo $ID | tr '@<:@:lower:@:>@' '@<:@:upper:@:>@'
|
||||
fi
|
||||
( if test -n "$ID_LIKE"; then
|
||||
echo $ID_LIKE | $AWK '{print $1}'
|
||||
else
|
||||
echo $ID
|
||||
fi ) | tr '@<:@:lower:@:>@' '@<:@:upper:@:>@'
|
||||
)"
|
||||
AS_CASE([$DISTRO],
|
||||
[FEDORA | RHEL | CENTOS | ALMALINUX | CLOUDLINUX | ROCKY],
|
||||
|
||||
Reference in New Issue
Block a user