Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #2 from schlick/master

  • Loading branch information...
commit e190aaa1ef9756c628d970f668496a60d2aea960 2 parents 47e8465 + 167a614
@andrew andrew authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 bin/brewdle
View
8 bin/brewdle
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.