From 6bd72629563cf6bed74ec220a1a4b034fbed8f63 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 5 Jan 2022 15:03:51 +0800 Subject: [PATCH] ghc-deps.sh: also match 'rts' if first, last, or only output --- ghc-deps.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index 0f215fe..dce4e65 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -36,7 +36,7 @@ for i in $files; do # exclude rts.conf $PKGCONFDIR/*-*.conf) name=$(grep "^name: " $i | sed -e "s/name: //") - ids=$($GHC_PKG field $name $field | sed -e "s/ rts / /") + ids=$($GHC_PKG field $name $field | sed -e "s/\(^\| \)rts\( \|$\)/ /") for d in $ids; do case $d in *-*-internal) ;; @@ -47,7 +47,7 @@ for i in $files; do ;; */libHS*_p.a) pkgver=$(basename $(dirname $i)) - ids=$($GHC_PKG field $pkgver $field | sed -e "s/ rts / /" -e "s/bin-package-db-[^ ]\+//") + ids=$($GHC_PKG field $pkgver $field | sed -e "s/\(^\| \)rts\( \|$\)/ /" -e "s/bin-package-db-[^ ]\+//") for d in $ids; do case $d in *-*-internal) ;;