Skip to content

Instantly share code, notes, and snippets.

@cfg
Created August 20, 2013 15:57
Show Gist options
  • Save cfg/6283398 to your computer and use it in GitHub Desktop.
Save cfg/6283398 to your computer and use it in GitHub Desktop.
Homebrew osxutils forumula. Modified to use the better trash util from http://hasseg.org/trash/
require 'formula'
class Osxutils < Formula
# begin cfg changes
# this `trash` is much better
depends_on 'trash'
# end cfg changes
homepage 'https://github.com/vasi/osxutils'
url 'https://github.com/vasi/osxutils/archive/v1.8.tar.gz'
sha1 'c3d20da36ecfae3abff07f482a572b3680a12b6d'
head 'https://github.com/vasi/osxutils.git'
def install
# begin cfg changes
# don't compile the trash script, the `trash` package is better
inreplace 'Makefile', /^(NAMES_SCRIPT\s+=\s+)(?:trash)?(\s*.*)\b(?:\s+(?:trash)?)\b(\s+.*)$/, '\1\2\3'
# rename the trash manpage so it won't automatically be installed
mv 'trash/trash.1', 'trash/trash.1.skip'
# end cfg changes
system 'make'
system 'make', "PREFIX=#{prefix}", 'install'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment