shithub: neindaw

Download patch

ref: 5168bc0b8701ce9f48427e4bceb36097e424c60f
parent: 78758aa22afd4f923b8641acff0e4cb19b2820a2
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Tue Dec 31 23:25:16 EST 2019

gen.sh: print an error if can't figure out class name

--- a/gen.sh
+++ b/gen.sh
@@ -3,6 +3,7 @@
 
 for i in *.dsp; do
 	class=$(grep -o declare.*name.* $i | head -1 | sed 's/^[^"]*//g;s/[^A-Za-z0-9]//g')
+	test -z "$class" && echo "$i: name not set in metadata" && exit 1
 	# in C () is not the same as (void) so fix it
 	# mark "dsp", "samplingFreq", and "inputs" args as USED
 	faust -lang c -a arch.c -cn $class $@ $i -o /dev/stdout \