From: Joe Wreschnig Date: Mon, 6 Oct 2014 09:37:47 +0000 (+0200) Subject: Simplify file reading. X-Git-Url: https://git.korewanetadesu.com/?p=fontstandard.git;a=commitdiff_plain;h=9bd41683bd280e25905e2e73dcfffd921a678e9d Simplify file reading. --- 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)' >> $@