summaryrefslogtreecommitdiff
path: root/data/bash/_metadata/prerm.appletvos-arm64
blob: b599c5202bbae689f6c238d475803a34eca60b04 (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
#!/bin/bash

set -e

case "$1" in
    upgrade)
  ;;

    remove|deconfigure)
      update-alternatives --quiet --remove sh /bin/bash
      dpkg-divert --local --quiet --rename --remove /bin/sh
      rm -f /usr/bin/bash
      if [ ! -e /bin/sh ]; then
          echo There would be no shell!
          ln -fs bash /bin/sh
          exit 1
      fi
  ;;

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