Simplify file reading.
authorJoe Wreschnig <joe.wreschnig@gmail.com>
Mon, 6 Oct 2014 09:37:47 +0000 (11:37 +0200)
committerJoe Wreschnig <joe.wreschnig@gmail.com>
Mon, 6 Oct 2014 09:37:47 +0000 (11:37 +0200)
Makefile

index 2df645e662b33b3fa2cc2160c0a8747257cb7603..1952f50f2adb6e920f77f6df534498021eb6b411 100644 (file)
--- 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)' >> $@