2
mkdir -p $(CURDIR)/debian/patches
3
rm -f $(CURDIR)/debian/patches/*.patch
4
git-format-patch -o $(CURDIR)/debian/patches debian-patches ^upstream
5
for patch in $$(ls $(CURDIR)/debian/patches/*.patch) ; \
7
lines=$$(cat $$patch | wc -l) ; \
8
head -n $$(($$lines - 3)) $$patch > $${patch}.chomped ; \
9
mv $${patch}.chomped $$patch ; \