From 4d49afcd52120fc9b0ba81d825e1200aae242e54 Mon Sep 17 00:00:00 2001 From: Luka Vandervelden Date: Wed, 12 Jun 2019 02:40:16 +0200 Subject: [PATCH] Improved substitutions with type[]=script. --- build/script.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/script.zsh b/build/script.zsh index bc974a7..d1254b9 100644 --- a/build/script.zsh +++ b/build/script.zsh @@ -14,9 +14,9 @@ function script.build { write " $S $(dirdep $target)" write "\t@echo '$(SED "${target}")'" write -n "\t${Q}sed -e '" - write -n "s&@LIBDIR@&\$(LIBDIR)&;" - write -n "s&@BINDIR@&\$(BINDIR)&;" - write -n "s&@SHAREDIR@&\$(SHAREDIR)&;" + for variable value in ${prefixes[@]} ${variables[@]}; do + write -n "s&@${variable}@&\$(${variable})&;" + done write "' $S > '${target}'" write "\t${Q}chmod +x '${target}'" fi