Move specialized formulae base classes into a new file
This commit is contained in:
parent
1b372d7840
commit
6af1aae50b
@ -2,6 +2,7 @@ require 'download_strategy'
|
|||||||
require 'formula_support'
|
require 'formula_support'
|
||||||
require 'hardware'
|
require 'hardware'
|
||||||
require 'extend/fileutils'
|
require 'extend/fileutils'
|
||||||
|
require 'formula_specialties'
|
||||||
|
|
||||||
|
|
||||||
# Derive and define at least @url, see Library/Formula for examples
|
# Derive and define at least @url, see Library/Formula for examples
|
||||||
@ -764,18 +765,3 @@ private
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# See youtube-dl.rb for an example
|
|
||||||
class ScriptFileFormula < Formula
|
|
||||||
def install
|
|
||||||
bin.install Dir['*']
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# See flac.rb for an example
|
|
||||||
class GithubGistFormula < ScriptFileFormula
|
|
||||||
def initialize name='__UNKNOWN__', path=nil
|
|
||||||
super name, path
|
|
||||||
@version=File.basename(File.dirname(url))[0,6]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|||||||
16
Library/Homebrew/formula_specialties.rb
Normal file
16
Library/Homebrew/formula_specialties.rb
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# Base classes for specialized types of formulae.
|
||||||
|
|
||||||
|
# See youtube-dl.rb for an example
|
||||||
|
class ScriptFileFormula < Formula
|
||||||
|
def install
|
||||||
|
bin.install Dir['*']
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# See flac.rb for an example
|
||||||
|
class GithubGistFormula < ScriptFileFormula
|
||||||
|
def initialize name='__UNKNOWN__', path=nil
|
||||||
|
super name, path
|
||||||
|
@version=File.basename(File.dirname(url))[0,6]
|
||||||
|
end
|
||||||
|
end
|
||||||
Loading…
x
Reference in New Issue
Block a user