[DRE-commits] [scripts] 01/01: find-inactive-contributors: remove hardcoded settings
zeha at debian.org
zeha at debian.org
Wed Jun 29 20:29:57 UTC 2016
This is an automated email from the git hooks/post-receive script.
zeha pushed a commit to branch master
in repository scripts.
commit 4d1890ffa119b24dab278e08b7df587cbda95e13
Author: Christian Hofstaedtler <christian at hofstaedtler.name>
Date: Wed Jun 29 22:29:52 2016 +0200
find-inactive-contributors: remove hardcoded settings
---
find-inactive-contributors | 30 +++++++++++++++++++++++++-----
1 file changed, 25 insertions(+), 5 deletions(-)
diff --git a/find-inactive-contributors b/find-inactive-contributors
index d3cf11f..3f7df43 100755
--- a/find-inactive-contributors
+++ b/find-inactive-contributors
@@ -14,8 +14,6 @@ require 'json'
require 'etc'
require 'time'
-GROUP = 'pkg-ruby-extras'
-ROOT = "/srv/git.debian.org/git/#{GROUP}"
DATAFILE = 'find-inactive-contributors.data'
TIME_ZERO = Time.at(0)
DAYS_INACTIVE = 365 * 2
@@ -84,12 +82,34 @@ def print_info
end
end
-case ARGV[0]
+def usage
+ puts "Usage: find-inactive-contributors GROUP GITROOT build|info"
+ puts "Where:"
+ puts " GROUP is the unix group name where contributors are part of"
+ puts " GITROOT is the absolute path where git repositories are contained in"
+ puts ""
+ puts "Example:"
+ puts " find-inactive-contributors pkg-ruby-extras /srv/git.debian.org/git/pkg-ruby-extras build"
+ puts ""
+ puts "Hint: run build and then info"
+ puts ""
+ puts "'build' will create the file #{DATAFILE} in your current working directory,"
+ puts "and 'info' will process it and print results."
+ exit 1
+end
+
+if ARGV.length < 2 then
+ usage
+end
+
+GROUP = ARGV[0]
+ROOT = ARGV[1]
+
+case ARGV[2]
when 'build'
build_data
when 'info'
print_info
else
- puts "usage: find-inactive-contributors build|info"
- puts "hint: run build and then info"
+ usage
end
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/scripts.git
More information about the Pkg-ruby-extras-commits
mailing list