argmaxinc / WhisperKit

On-device Speech Recognition for Apple Silicon
http://argmaxinc.com/blog/whisperkit
MIT License
3.92k stars 331 forks source link

Add `brew install trash` to `make setup` script #50

Closed ZachNagengast closed 8 months ago

ZachNagengast commented 8 months ago

trash, used in the following make rule, is not part of a default macOS setup.

clean-package-caches:
    @trash ~/Library/Caches/org.swift.swiftpm/repositories
    @trash ~/Library/Developer/Xcode/DerivedData

I see three options to address this:

  1. use rm instead, and delete immediately
  2. use mv, and move the files to the user's trash in ~/.Trash (only works properly if the files are in the local disk; for external hard drives trashes are at /Volumes/NAME_OF_EXTERNAL/.Trashes/USER_ID/, and to handle these cases probably better go with option 3)
  3. install trash using Homebrew in the setup rule.

Originally posted by @metropol in https://github.com/argmaxinc/WhisperKit/discussions/47