From 3dc487d989d47a71286d27f0c47a5189e19ee01e Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 5 Mar 2023 14:05:16 -0600 Subject: [PATCH] Mac's gsed is slow to launch, so avoid one repeated call in a loop. --- scripts/make.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/make.sh b/scripts/make.sh index b0c3d22a..01b93ea3 100755 --- a/scripts/make.sh +++ b/scripts/make.sh @@ -205,8 +205,7 @@ function getglobals() { for i in toys/*/*.c do - # alas basename -s isn't in posix yet. - NAME="$(echo $i | $SED 's@.*/\(.*\)\.c@\1@')" + NAME=${i##*/} NAME=${NAME%\.c} DATA="$($SED -n -e '/^GLOBALS(/,/^)/b got;b;:got' \ -e 's/^GLOBALS(/_data {/' \ -e 's/^)/};/' -e 'p' $i)" -- 2.39.2