Skip to content

Commit

Permalink
be more explicit about which libs are rm-ed
Browse files Browse the repository at this point in the history
  • Loading branch information
audibleblink committed Feb 25, 2024
1 parent 344bcea commit c1e1654
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions Casks/s/starnet2.rb
Expand Up @@ -51,15 +51,21 @@
EOS
end

uninstall delete: [
"/usr/local/lib/libc10.dylib",
"/usr/local/lib/libopencv_*",
"/usr/local/lib/libtorch.dylib",
"/usr/local/lib/libtorch_cpu.dylib",
]
uninstaller = "#{bin_path}/uninstaller.sh"
uninstall_preflight do
libs = Dir.children("#{caskroom_path}/#{version}/StarNet2T_MacOS/lib").map { |lib| "/usr/local/lib/#{lib}" }
File.write uninstaller, <<~EOS
rm #{libs.join(" ")}
EOS
end

uninstall script: {
executable: uninstaller,
sudo: true,
}

# No zap stanza required
#

caveats do
files_in_usr_local
end
Expand Down

0 comments on commit c1e1654

Please sign in to comment.