#!/bin/sh
# Bear uninstall script
# This script was generated during installation and removes all installed files.
# Usage: sh uninstall.sh

set -e

# Remove bear binaries
rm -f '/clangarm64/share/bear/bin/bear-driver'
rm -f '/clangarm64/share/bear/bin/bear-wrapper'
rmdir '/clangarm64/share/bear/bin' 2>/dev/null || true
rmdir '/clangarm64/share/bear' 2>/dev/null || true
rmdir '/clangarm64/share' 2>/dev/null || true

# Remove bear entry script
rm -f '/clangarm64/bin/bear'
rmdir '/clangarm64/bin' 2>/dev/null || true

# Remove man page
rm -f '/clangarm64/share/man/man1/bear.1'
rmdir '/clangarm64/share/man/man1' 2>/dev/null || true
rmdir '/clangarm64/share/man' 2>/dev/null || true
rmdir '/clangarm64/share' 2>/dev/null || true

# Remove documentation
rm -f '/clangarm64/share/doc/bear/README.md'
rm -f '/clangarm64/share/doc/bear/COPYING'
rmdir '/clangarm64/share/doc/bear' 2>/dev/null || true
rmdir '/clangarm64/share/doc' 2>/dev/null || true
rmdir '/clangarm64/share' 2>/dev/null || true

# Remove uninstall script
rm -f '/clangarm64/share/bear/uninstall.sh'
rmdir '/clangarm64/share/bear' 2>/dev/null || true
rmdir '/clangarm64/share' 2>/dev/null || true

echo 'Bear uninstalled from /clangarm64'
