Wintus
7/23/2016 - 4:02 PM

Make config file

Make config file

Configs = $(wildcard conf.d/*.conf)

config: $(Configs)
	echo '# ssh' | \
	cat - $^ > $@
	[ -e px ] && $(call SHPX, $@)

define SHPX
perl -p -i -e 's/^# sh\(.*\)/join "\n", px{$1}/e' $1
endef