From 9bd41683bd280e25905e2e73dcfffd921a678e9d Mon Sep 17 00:00:00 2001 From: Joe Wreschnig Date: Mon, 6 Oct 2014 11:37:47 +0200 Subject: [PATCH] Simplify file reading. --- Makefile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 2df645e..1952f50 100644 --- a/Makefile +++ b/Makefile @@ -42,11 +42,10 @@ $(VARIABLES): | sed -E 's/.*$(CODEPOINT).*/SelectMore(0u\1);/g' >> $@ echo 'DetachAndRemoveGlyphs();' >> $@ - grep -v '^#' $*.remap.txt | while read line; do \ - a=( $$line ); \ - (grep -E -m 1 "@fa-var-$${a[1]}:" $(VARIABLES) \ - || echo "$${a[1]} not found." >&2) \ - | sed -E 's/.*$(CODEPOINT).*/Select(0u\1); CopyReference(); Select(0u'$${a[0]}'); Paste();/g' >> $@ \ + grep -v '^#' $*.remap.txt | while read -r dst src rest; do \ + (grep -E -m 1 "@fa-var-$${src}:" $(VARIABLES) \ + || echo "$${src} not found." >&2) \ + | sed -E 's/.*$(CODEPOINT).*/Select(0u\1); CopyReference(); Select(0u'$${dst}'); Paste();/g' >> $@ \ ; done echo 'Generate($$2)' >> $@ -- 2.20.1