Improve APE install scripts and add uninstaller

See #350 thanks @tkchia
This commit is contained in:
Justine Tunney 2022-07-10 14:13:45 -07:00
parent 331fdd1d29
commit 68ca49bfdd
4 changed files with 149 additions and 68 deletions

24
ape/apeuninstall.sh Executable file
View file

@ -0,0 +1,24 @@
#!/bin/sh
if [ "$UID" = "0" ]; then
SUDO=
else
SUDO=sudo
fi
{
echo
echo "APE Uninstaller intends to run"
echo
echo " $SUDO sh -c 'echo -1 >/proc/sys/fs/binfmt_misc/APE'"
echo " $SUDO rm -f /usr/bin/ape ~/.ape o/tmp/.ape /tmp/.ape"
echo
echo "You may then use ape/apeinstall.sh to reinstall it"
echo
} >&2
set -ex
if [ -f /proc/sys/fs/binfmt_misc/APE ]; then
$SUDO sh -c 'echo -1 >/proc/sys/fs/binfmt_misc/APE' || exit
fi
$SUDO rm -f /usr/bin/ape ~/.ape o/tmp/.ape /tmp/.ape || exit