File: preinst

package info (click to toggle)
joe 4.6-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 10,232 kB
  • sloc: ansic: 51,619; sh: 4,326; makefile: 195; csh: 26
file content (13 lines) | stat: -rw-r--r-- 357 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh -e

case $1 in
install|upgrade)
	# drop old editorrc (master alternative and symlink file both)
	if test -z "$2" || \
	    dpkg --compare-versions "$2" lt '3.7-2.3~'; then
		# this will noisily pass if editorrc was already removed,
		# but not remove a slave alternative
		(update-alternatives --remove-all editorrc 2>/dev/null || :)
	fi
	;;
esac