#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1

%:
	dh $@ --with bash-completion

override_dh_fixperms:
	dh_fixperms
	chmod a+x debian/plowshare4/usr/share/plowshare4/core.sh

override_dh_bash-completion:
	dh_bash-completion
	sed -i -e '/cut/ s,/usr/local,/usr,' \
		debian/plowshare4/etc/bash_completion.d/plowshare

override_dh_install:
	dh_install
	v=$(shell cat debian/git-describe) && \
		for file in debian/plowshare4/usr/share/plowshare4/*.sh; do \
			sed -i -e 's/^\(declare -r VERSION=\).*/\1'"'$$v'"'/' "$$file"; \
		done

override_dh_auto_build override_dh_auto_install:
