From 29e624aaa14b98a45f0408e0b1925b60136871d3 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sat, 25 Jul 2015 17:03:59 +0200 Subject: o Adding a Make target to fix files after the Arduino IDE appends some blank lines. --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 3f4c604..9445351 100644 --- a/Makefile +++ b/Makefile @@ -16,3 +16,9 @@ ARDMK_DIR ?= /usr/share/arduino $(ARDMK_DIR)/Arduino.mk: @if [ ! -r $(ARDMK_DIR)/Arduino.mk ]; then echo "You need to install the arduino-mk package"; fi @false + +fix-lines: + @for f in `ls -1 *.cpp *.h *.ino`; do \ + sed -e :a -e '/^\n*$$/{$$d;N;ba' -e '}' $$f > x; \ + mv x $$f; \ + done -- cgit v1.2.3