#!/bin/sh

set -e

if test "$1" = "remove"; then
    if command -v update-binfmts >/dev/null; then
        update-binfmts --package llvm-18-runtime \
            --remove llvm-18-runtime.binfmt /usr/bin/lli-18 || true
        if test -f /var/lib/binfmts/llvm-18.binfmt; then
            # Purge old file
            update-binfmts --package llvm-18-runtime \
                --remove llvm-18.binfmt /usr/bin/lli-18 || true
        fi
    fi
fi



