summaryrefslogtreecommitdiffstats
path: root/ncurses-bin.pkg
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-08-04 11:41:09 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-08-04 11:41:09 (EDT)
commit4314663066526170a019628c2153e6239269eb69 (patch)
tree4903cf8115b54d8a9d51a08c6370942c50d79e67 /ncurses-bin.pkg
parente879012e955960a6d6523f73d917de9ed61bb208 (diff)
Manage clear and reset with update-alternatives.
Diffstat (limited to 'ncurses-bin.pkg')
-rwxr-xr-xncurses-bin.pkg/postinst8
-rwxr-xr-xncurses-bin.pkg/prerm6
2 files changed, 14 insertions, 0 deletions
diff --git a/ncurses-bin.pkg/postinst b/ncurses-bin.pkg/postinst
new file mode 100755
index 0000000..d68ce3f
--- /dev/null
+++ b/ncurses-bin.pkg/postinst
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ "x${1}" = 'xconfigure' ]; then
+ update-alternatives --install /usr/bin/clear clear \
+ /usr/bin/clear.ncurses 10
+ update-alternatives --install /usr/bin/reset reset \
+ /usr/bin/reset.ncurses 10
+fi
diff --git a/ncurses-bin.pkg/prerm b/ncurses-bin.pkg/prerm
new file mode 100755
index 0000000..d066d16
--- /dev/null
+++ b/ncurses-bin.pkg/prerm
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+if [ "x${1}" = 'xremove' ]; then
+ update-alternatives --remove clear /usr/bin/clear.ncurses
+ update-alternatives --remove reset /usr/bin/reset.ncurses
+fi