#!/bin/bash
# Modified by the Noite project on 2026-11-10 under the Apache License 2.0: every name in it says Noite instead of the product it grew from (identifiers, files, strings, URLs).
lsr=/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister
"$lsr" -dump 2>/dev/null | sed -n 's/^path: *\(.*\/Noite[^/]*\.app\) (0x.*/\1/p' | grep -v '/Contents/' | sort -u |
  while IFS= read -r app; do
    case "$app" in
      /Applications/Noite.app | */dist/*-rc/export/Noite.app) ;;
      *) "$lsr" -u "$app" 2>/dev/null ;;
    esac
  done
