diff options
author | Sam Bingner <sam@bingner.com> | 2019-12-03 11:29:21 -1000 |
---|---|---|
committer | Sam Bingner <sam@bingner.com> | 2019-12-05 13:30:43 -1000 |
commit | b14db911a4316f4cf2802d8653b0e9e4052570c3 (patch) | |
tree | eb0a1c92877d3696ceeceef848fa862f4ef8ad2b /data/bash | |
parent | 53bae0fab06fe89b3e2904f37708045eda46ecc6 (diff) |
Add diverts to work around binpack on tvos
Diffstat (limited to 'data/bash')
-rwxr-xr-x | data/bash/_metadata/postinst.appletvos-arm64 | 18 | ||||
-rwxr-xr-x | data/bash/_metadata/prerm.appletvos-arm64 | 26 |
2 files changed, 44 insertions, 0 deletions
diff --git a/data/bash/_metadata/postinst.appletvos-arm64 b/data/bash/_metadata/postinst.appletvos-arm64 new file mode 100755 index 000000000..22e6d7064 --- /dev/null +++ b/data/bash/_metadata/postinst.appletvos-arm64 @@ -0,0 +1,18 @@ +#!/bin/bash + +set -e + +if [ ! -e /bin/sh ]; then + ln -s bash /bin/sh +fi + +case "$1" in + abort-remove|configure) + dpkg-divert --quiet --local --rename /bin/sh + update-alternatives --quiet --install /bin/sh sh /bin/bash 100 || true + ln -fs /bin/bash /usr/bin/bash + ;; + *) + exit 0 + ;; +esac diff --git a/data/bash/_metadata/prerm.appletvos-arm64 b/data/bash/_metadata/prerm.appletvos-arm64 new file mode 100755 index 000000000..b599c5202 --- /dev/null +++ b/data/bash/_metadata/prerm.appletvos-arm64 @@ -0,0 +1,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 |