summaryrefslogtreecommitdiff
path: root/data/bash/_metadata/prerm
diff options
context:
space:
mode:
authorSam Bingner <sam@bingner.com>2019-03-29 23:57:11 -1000
committerSam Bingner <sam@bingner.com>2019-03-29 23:57:11 -1000
commit75c2158d2a7b1ae2def3c5b31dbbf33148225902 (patch)
treecd868b1d46da40694b742966a1e3b65acdcc8073 /data/bash/_metadata/prerm
parent06ef0d89ea57d333861c065c8c2870f3aa67b31b (diff)
Make dpkg exec smarter; Update bash, tcsh, and zsh
Diffstat (limited to 'data/bash/_metadata/prerm')
-rwxr-xr-xdata/bash/_metadata/prerm25
1 files changed, 25 insertions, 0 deletions
diff --git a/data/bash/_metadata/prerm b/data/bash/_metadata/prerm
new file mode 100755
index 000000000..500128886
--- /dev/null
+++ b/data/bash/_metadata/prerm
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+set -e
+
+case "$1" in
+ upgrade)
+ ;;
+
+ remove|deconfigure)
+ update-alternatives --quiet --remove sh /bin/bash
+ dpkg-divert --quiet --remove /bin/sh
+ if [ ! -e /bin/sh ]; then
+ echo There would be no shell!
+ ln -s bash /bin/sh
+ exit 1
+ fi
+ ;;
+
+ failed-upgrade)
+ ;;
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac