summaryrefslogtreecommitdiffstats
path: root/debian/powerline-gitstatus.postrm
blob: 88cb4e644ad257843f2ef60753ae197aae19e617 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh

set -e

case "${1}" in
	remove)
		for FILE in /usr/share/powerline/config_files/colorschemes/default.json \
			    /usr/share/powerline/config_files/themes/shell/default.json \
			    /usr/share/powerline/config_files/themes/shell/default_leftonly.json
		do
			DIVERTION="/usr/share/powerline-gitstatus/divert/$(basename $(dirname ${FILE}))_$(basename ${FILE}).powerline"

			dpkg-divert --package powerline-gitstatus --quiet --remove --rename --divert "${DIVERTION}" "${FILE}"
		done

		rmdir -p --ignore-fail-on-non-empty /usr/share/powerline-gitstatus/divert > /dev/null 2>&1 || true
		;;

	purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)

		;;

	*)
		echo "postrm called with unknown argument \`$1'" >&2
		exit 1
		;;
esac

#DEBHELPER#

exit 0