Permalink
Browse files

imagesnap formula: give option to install pre-built binary

  • Loading branch information...
1 parent 2e9aeb9 commit 9ca81be3e7b9f4c32b2ebadbc72648ac8dd2b179 @michihuber committed Jun 24, 2012
Showing with 9 additions and 2 deletions.
  1. +9 −2 Library/Formula/imagesnap.rb
@@ -4,9 +4,16 @@ class Imagesnap < Formula
url 'http://downloads.sourceforge.net/project/iharder/imagesnap/ImageSnap-v0.2.5.tgz'
homepage 'http://iharder.sourceforge.net/current/macosx/imagesnap/'
md5 '32e341f059a91703816d8aa9b87fb1e4'
+ def options
+ [['--no-build', "Copy the pre-built binary instead of building yourself"]]
+ end
def install
- system "xcodebuild -project ImageSnap.xcodeproj SYMROOT=build -sdk macosx#{MACOS_VERSION}"
- bin.install "build/Release/imagesnap"
+ if ARGV.include? '--no-build'
+ bin.install "imagesnap"
+ else
+ system "xcodebuild -project ImageSnap.xcodeproj SYMROOT=build -sdk macosx#{MACOS_VERSION}"
+ bin.install "build/Release/imagesnap"
+ end
end
end

0 comments on commit 9ca81be

Please sign in to comment.