bin/gitauth in brownbeagle-gitauth-0.0.4.3 vs bin/gitauth in brownbeagle-gitauth-0.0.4.5
- old
+ new
@@ -196,12 +196,16 @@
group.destroy!
puts "Removed group '#{name}'"
end
a.add("usage", "Prints out the sample usage instructions") do |options|
- File.open(GitAuth::BASE_DIR.join("USAGE")) do |f|
- f.each_line { |line| puts line }
+ pager = nil
+ if ENV.has_key?('PAGER')
+ pager = ENV['PAGER'].blank? ? 'cat' : ENV['PAGER']
+ else
+ pager = "less"
end
+ exec "#{pager} '#{GitAuth::BASE_DIR.join("USAGE")}'"
end
a.add("show-repo NAME", "Shows information for a repository with a given name") do |name, options|
GitAuth.prepare
repo = GitAuth::Repo.get(name)
\ No newline at end of file