Permalink
Browse files

shared-mime-info: build the cache in post_install

Generate the Shared MIME-Info database cache when the shared-mime-info
formula is installed, rather than solely relying on reverse dependencies
to run update-mime-database just in time.

Closes #5581.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
  • Loading branch information...
ilovezfs committed Oct 4, 2016
1 parent 1807b44 commit f514bef9098cc6f1c5d27d9c02c31a15820f4333
Showing with 5 additions and 0 deletions.
  1. +5 −0 Formula/shared-mime-info.rb
@@ -3,6 +3,7 @@ class SharedMimeInfo < Formula
homepage "https://wiki.freedesktop.org/www/Software/shared-mime-info"
url "https://freedesktop.org/~hadess/shared-mime-info-1.7.tar.xz"
sha256 "eacc781cfebaa2074e43cf9521dc7ab4391ace8a4712902b2841669c83144d2e"
revision 1
bottle do
cellar :any
@@ -39,6 +40,10 @@ def install
system "make", "install"
end
def post_install
system bin/"update-mime-database", HOMEBREW_PREFIX/"share/mime"
end
test do
cp_r share/"mime", testpath
system bin/"update-mime-database", testpath/"mime"

0 comments on commit f514bef

Please sign in to comment.