Permalink
Browse files

Merge pull request #2 from schlick/master

  • Loading branch information...
andrew committed Aug 5, 2011
2 parents 47e8465 + 167a614 commit e190aaa1ef9756c628d970f668496a60d2aea960
Showing with 6 additions and 2 deletions.
  1. +6 −2 bin/brewdle
View
@@ -16,7 +16,7 @@ command :install do |c|
dependencies = []
File.open(File.join(Dir.pwd, 'Brewfile')).each { |line|
line.chomp!
- if line.length > 0
+ if line.length > 0 && !comment?(line)
dependencies << line
end
}
@@ -25,7 +25,7 @@ command :install do |c|
end
dependencies.each do |dependency|
- installed_version = installed?(dependency)
+ installed_version = installed?(dependency)
puts "#{installed_version ? 'Using' : 'Installing'}: #{dependency} #{installed_version}"
install(dependency) unless installed_version
end
@@ -49,3 +49,7 @@ def installed?(name)
return installed.split(' ').last
end
end
+
+def comment?(line)
+ line =~ /^ *#/
+end

0 comments on commit e190aaa

Please sign in to comment.