9 lines
367 B
Swift
9 lines
367 B
Swift
import AppKit
|
|
// Reuse the approved application icon; no artwork or user files are altered.
|
|
guard CommandLine.arguments.count == 3,
|
|
let icon = NSImage(contentsOfFile:CommandLine.arguments[1]),
|
|
NSWorkspace.shared.setIcon(icon,forFile:CommandLine.arguments[2],options:[]) else {
|
|
fputs("Could not set the disk image Finder icon.\n",stderr)
|
|
exit(1)
|
|
}
|