mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-07 06:53:33 +00:00
6843150e0c
This change also incorporates more bug fixes and improvements to a wide variety of small things. For example this fixes #860 so Windows console doesn't get corrupted after exit. An system stack memory map issue with aarch64 has been fixed. We no longer use O_NONBLOCK on AF_UNIX sockets. Crash reports on Arm64 will now demangle C++ symbols, even when c++filt isn't available. Most importantly the Apple M1 version of APE Loader is brought up to date by this change. A prebuilt unsigned binary for it is being included in build/bootstrap/. One more thing: retrieving the term dimensions under --strace was causing the stack to become corrupted and now that's been solved too. PSS: We're now including an ELF PT_NOTE for APE in the binaries we build, that has the APE Loader version.
47 lines
858 B
Bash
Executable file
47 lines
858 B
Bash
Executable file
#!/bin/sh
|
|
|
|
if [ "$UID" = "0" ]; then
|
|
SUDO=
|
|
else
|
|
SUDO=sudo
|
|
fi
|
|
|
|
{
|
|
echo
|
|
echo "APE Uninstaller intends to run (in pseudo-shell)"
|
|
echo
|
|
echo " sudo echo -1 into /proc/sys/fs/binfmt_misc/APE*"
|
|
echo " sudo rm -f /usr/bin/ape ~/.ape /tmp/.ape # etc."
|
|
echo
|
|
echo "You may then use ape/apeinstall.sh to reinstall it"
|
|
echo
|
|
} >&2
|
|
|
|
set -ex
|
|
for f in /proc/sys/fs/binfmt_misc/APE*; do
|
|
if [ -f $f ]; then
|
|
$SUDO sh -c "echo -1 >$f" || exit
|
|
fi
|
|
done
|
|
|
|
# system installation
|
|
if [ -f /usr/bin/ape ]; then
|
|
$SUDO rm -f /usr/bin/ape
|
|
fi
|
|
|
|
# legacy installations
|
|
rm -f o/tmp/ape /tmp/ape "${TMPDIR:-/tmp}/ape"
|
|
|
|
# ad-hoc installations
|
|
for x in .ape \
|
|
.ape-1.1 \
|
|
.ape-1.3 \
|
|
.ape-1.4 \
|
|
.ape-blink-0.9.2 \
|
|
.ape-blink-1.0.0; do
|
|
rm -f \
|
|
~/$x \
|
|
/tmp/$x \
|
|
o/tmp/$x \
|
|
"${TMPDIR:-/tmp}/$x"
|
|
done
|