Created
August 6, 2015 14:33
-
-
Save markito3/a1865019f9d600f8e897 to your computer and use it in GitHub Desktop.
Script to create "halld" subversion author list for svn2git conversion.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
$groupid = 267; | |
open (YPCAT,"ypcat group |"); | |
$group_count = 0; | |
$liststring = ""; | |
while (<YPCAT>) { | |
if (/:$groupid:/) { | |
#print; | |
$group_count++; | |
chomp; | |
@t = split/:$groupid:/; | |
$liststring .= "$t[1],"; | |
} | |
} | |
#print $liststring, "\n"; | |
@users = split(/,/, $liststring); | |
foreach $user (@users) { | |
if ($user) { # eliminate blank user from final comma | |
#print $user, "\n"; | |
open (STAFF, "staff $user |"); | |
while (<STAFF>) { | |
#print; | |
if (/\s$user$/) { | |
@t1 = split /, /; | |
$last = $t1[0]; | |
$rest = $t1[1]; | |
@t2 = split(/\s+/, $rest); | |
$first = $t2[0]; | |
print "$user = $first $last <$user\@jlab.org>\n"; | |
last; | |
} | |
} | |
} | |
} | |
# add necessary authors not in the hall d group | |
print "wolin = Elliott Wolin <wolin\@jlab.org>\n"; | |
print "manak = Joe Manak <manak\@jlab.org>\n"; | |
print "weygand = Dennis Weygand <weygand\@jlab.org>\n"; | |
print "jcummngs = John Cummings <jcummngs\@jlab.org>\n"; | |
print "futch = Brad Futch <futch\@jlab.org>\n"; | |
print "bellis = Matt Bellis <bellis\@jlab.org>\n"; | |
print "craigb = Craig Bookwalter <craigb\@jlab.org>\n"; | |
print "ablackbu = Andrew Blackburn <ablackbu\@jlab.org>\n"; | |
print "deloso = Vincent Deloso <deloso\@jlab.org>\n"; | |
print "kornicer = Mihajlo Kornicer <kornicer\@jlab.org>\n"; | |
print "leverinb = Blake Leverington <leverinb\@jlab.org>\n"; | |
print "mushkar = Alexander Mushkar <mushkar\@jlab.org>\n"; | |
print "jbarry = name unknown <jbarry\@jlab.org>\n"; | |
print "xu = Chuncheng Xu <xu\@jlab.org>\n"; | |
print "(no author) = name unknown <no_author\@no_node>\n"; | |
exit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment