tags 720982 patch
thanks

Hello Lucas,

Here is a patch that lets users provide additional package names to
how-can-i-help. It is quite minimal. 

I am not used to ruby, but I would enjoy contributing to this package
development. I suppose we should leave easy hacks for others to join. As
a recent contributor I often wonder how to involve more, so maybe I have
a fresh look here.

Thank you for this useful package,
Christophe
--- /usr/bin/how-can-i-help	2013-09-12 09:11:18.000000000 +0200
+++ how-can-i-help	2013-09-12 16:55:24.602299535 +0200
@@ -33,6 +33,7 @@
 $quiet = false
 $all = false
 $root = (Process.euid == 0)
+$add_packages = nil
 
 optparse = OptionParser.new do |opts|
   opts.on('-h', '--help', 'show help') do
@@ -48,6 +49,10 @@
     $quiet = true
   end
 
+  opts.on('-p',  '--packages foo,bar,baz', Array, 'provide a list of additional packages to care about') do |packages|
+    $add_packages = packages
+  end
+
 end
 optparse.parse!
 
@@ -95,6 +100,12 @@
   end
 end
 
+if $add_packages
+  $add_packages.each do |p|
+    packages << p.lstrip
+  end
+end
+
 helpitems_filtered = []
 helpitems.each do |hi|
   next if (not $all) and seen.include?(hi['hash'])

Reply via email to