summaryrefslogtreecommitdiff
path: root/data/zsh/_metadata/prerm
blob: 2fbcc5a4d452fd56694234d7c7f5cee233cd1f46 (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
#!/bin/zsh

set -e

case "$1" in
    upgrade)
  ;;

    remove|deconfigure)
      update-alternatives --quiet --remove sh /bin/zsh
      if [ ! -e /bin/sh ]; then
          echo There would be no shell!
          ln -s zsh /bin/sh
          exit 1
      fi
  ;;

    failed-upgrade)
  ;;
    *)
        echo "prerm called with unknown argument \`$1'" >&2
        exit 1
  ;;
esac