Mac: Update Makefile to work on Mac zsh

Using the -n flag on echo is non-standard for zsh. printf ‘%s’ accomplishes the equivilent thing.

Changelog-Added: Small fix for Mac OS building

# Conflicts:
#	plugins/Makefile
This commit is contained in:
Dustin Dettmer 2023-04-11 16:43:06 -04:00 committed by Rusty Russell
parent 6a734d8b4d
commit 6472475714

View file

@ -100,5 +100,5 @@ $(CODE_DIRS:%=%/csv.py):
$(CODE_DIRS:%=%/text.py):
@echo 'desc = "'`head -n1 $< | cut -c3-`'"' > $@.tmp
@(echo -n 'text = """'; sed 's,\\,\\\\,g' < $<; echo '"""') >> $@.tmp
@(printf '%s' 'text = """'; sed 's,\\,\\\\,g' < $<; echo '"""') >> $@.tmp
@if cmp $@ $@.tmp >/dev/null 2>&1; then rm $@.tmp; echo '$@ unchanged'; else mv $@.tmp $@; fi