aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils.rb
diff options
context:
space:
mode:
authorAdam Vandenberg2014-05-26 11:19:00 -0700
committerAdam Vandenberg2014-05-26 18:33:31 -0700
commit8d44db6b40f649e292292d9e164b7aa769d635c7 (patch)
tree721cdb7dbc0770dea66a0f927344fcfb04cb2254 /Library/Homebrew/utils.rb
parent6eb220d78f486c1795ea06fca3afa53755615527 (diff)
downloadbrew-8d44db6b40f649e292292d9e164b7aa769d635c7.tar.bz2
pluralize formulae in tap/untap
Closes Homebrew/homebrew#28560.
Diffstat (limited to 'Library/Homebrew/utils.rb')
-rw-r--r--Library/Homebrew/utils.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index ac84c1602..36b30d857 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -78,6 +78,10 @@ def pretty_duration s
return "%.1f minutes" % (s/60)
end
+def plural n, s="s"
+ (n == 1) ? "" : s
+end
+
def interactive_shell f=nil
unless f.nil?
ENV['HOMEBREW_DEBUG_PREFIX'] = f.prefix