diff options
| author | Max Howell | 2009-10-04 19:32:02 +0100 |
|---|---|---|
| committer | Max Howell | 2009-10-04 20:15:33 +0100 |
| commit | 346e42d4b9d1ed56fe6a3077b150d1ef6d6e5d4b (patch) | |
| tree | a3e9b749b63fc8f47b6c66cb4b9d93b0e46ed0be /Library | |
| parent | ef580e9541689922fb405228aaa3b95e7c5503cb (diff) | |
| download | brew-346e42d4b9d1ed56fe6a3077b150d1ef6d6e5d4b.tar.bz2 | |
Set homepage in created scripts to frontmost Safari URL
A bit of fun with Applescript, for those of us who use Safari.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/brew.h.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/brew.h.rb b/Library/Homebrew/brew.h.rb index 83cb79c50..4d0f45377 100644 --- a/Library/Homebrew/brew.h.rb +++ b/Library/Homebrew/brew.h.rb @@ -29,13 +29,15 @@ def __make url, name path = Formula.path name raise "#{path} already exists" if path.exist? + homepage = `osascript -e 'tell application "Safari" to if running then get URL of document of first window'`.chomp + template=<<-EOS require 'brewkit' class #{Formula.class_s name} <Formula url '#{url}' - homepage '' md5 '' + homepage '#{homepage}' cmake depends_on 'cmake' |
