echo -e "1i\nlustre ($$lversion-1) unstable; urgency=low\n\n * Automated changelog entry update\n\n -- Brian J. Murrell <brian@interlinx.bc.ca> $$(date -R)\n\n.\nwq" | ed debian/changelog; \
fi; \
if [ -d .git ]; then \
- ver=$$(git describe --tags); \
+ ver=$$(git describe --match v\* --tags); \
if [[ $$ver = *-*-* ]]; then \
hash=$${ver##*-}; \
ffw=$${ver#*-}; \
-e 's/_/./g'); \
fi; \
pdir="debian/patches"; \
- git format-patch -o $$pdir $$tag..HEAD^; \
- if [ ! -d $$pdir ]; then \
- mkdir $$pdir; \
+ if [ -d $$pdir ]; then \
+ rm -rf $$pdir; \
fi; \
+ mkdir $$pdir; \
+ git format-patch -o $$pdir $$tag..HEAD; \
pushd $$pdir; \
- if [ ! -d ../patched ]; then \
- mkdir ../patched; \
+ if [ -d ../patched ]; then \
+ rm -rf ../patched; \
fi; \
+ mkdir ../patched; \
rm -f 00list *.dpatch; \
for file in [0-9][0-9][0-9][0-9]-*.patch; do \
- desc=$$(cat $$file | sed -e '1,/^$$/d' \
- -e '/^---$$/,$$d'); \
- dpatch_file=$${file/.patch/.dpatch}; \
- sed -e '1,/^---$$/d' $$file | \
- dpatch patch-template -p "$${file%.patch}" \
- "$$desc" > $$dpatch_file; \
- echo "faked by make debs run from git" > \
- ../patched/$$dpatch_file; \
- echo $$dpatch_file >> 00list; \
+ if ! grep -q "^ debian/changelog" $$file; then \
+ desc=$$(cat $$file | sed -e '1,/^$$/d' \
+ -e '/^---$$/,$$d'); \
+ dpatch_file=$${file/.patch/.dpatch}; \
+ sed -e '1,/^---$$/d' $$file | \
+ dpatch patch-template -p "$${file%.patch}" \
+ "$$desc" > $$dpatch_file; \
+ echo "faked by make debs run from git" > \
+ ../patched/$$dpatch_file; \
+ echo $$dpatch_file >> 00list; \
+ fi; \
rm -f $$file; \
done; \
fi; \