kache 1.2.1

Compiler cache for Rust, C/C++ and CUDA, with S3, GCS, shared-filesystem and OCI remotes.
#!/bin/sh
set -e

# Remove only the canonical farm. Extra names a local admin added with
# `kache init --shims /usr/lib/kache` are left in place.
case "$1" in
remove|deconfigure)
  if [ -d /usr/lib/kache ]; then
    for name in cc c++ gcc g++ clang clang++ cargo; do
      path="/usr/lib/kache/$name"
      if [ -L "$path" ]; then
        rm -f "$path"
      fi
    done
    # `kache init --shims` writes this marker next to the links.
    rm -f /usr/lib/kache/.kache-shims
    rmdir /usr/lib/kache 2>/dev/null || true
  fi
  ;;
esac

exit 0