include FileUtils into Formula

Thus mv, rm etc, functions are almost as handy as pure shell scripting, without issues related to spaces in filenames.
This commit is contained in:
Max Howell 2009-12-01 10:54:59 +00:00
parent 1dc9df13fb
commit 4cea6157a1

View File

@ -22,6 +22,7 @@
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# #
require 'download_strategy' require 'download_strategy'
require 'fileutils'
class FormulaUnavailableError <RuntimeError class FormulaUnavailableError <RuntimeError
def initialize name def initialize name
@ -92,6 +93,8 @@ end
# Derive and define at least @url, see Library/Formula for examples # Derive and define at least @url, see Library/Formula for examples
class Formula class Formula
include FileUtils
# Homebrew determines the name # Homebrew determines the name
def initialize name='__UNKNOWN__' def initialize name='__UNKNOWN__'
set_instance_variable 'url' set_instance_variable 'url'