Skip to content

Commit

Permalink
Do not fail cleaning the tmp directories when there is no default for…
Browse files Browse the repository at this point in the history
…mula.
  • Loading branch information
calavera committed Mar 5, 2013
1 parent 59fb2e8 commit 8b88579
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bin/brew2deb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
require 'optparse'
require 'fileutils'

if ARGV.include? 'clean'
FileUtils.rm_rf %w[ tmp-build tmp-install ], :verbose => true
exit
end

formula = ARGV.find{ |arg| arg =~ /\.rb$/ and File.exists?(arg) }
formula ||= 'formula.rb'

Expand All @@ -12,11 +17,6 @@ end

Dir.chdir File.dirname(File.expand_path(formula))

if ARGV.include? 'clean'
FileUtils.rm_rf %w[ tmp-build tmp-install ], :verbose => true
exit
end

$:.unshift File.expand_path('../../lib', __FILE__)
require 'debian_formula'

Expand Down

0 comments on commit 8b88579

Please sign in to comment.