[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [532] trunk/import_members.pl



Revision: 532
          http://svn.sourceforge.net/ledger-smb/?rev=532&view=rev
Author:   christopherm
Date:     2006-11-12 11:53:08 -0800 (Sun, 12 Nov 2006)

Log Message:
-----------
Using ARGV[0] for $membersfile, displaying usage message if not supplied. Minor UI tweaks.

Modified Paths:
--------------
    trunk/import_members.pl

Modified: trunk/import_members.pl
===================================================================
--- trunk/import_members.pl	2006-11-12 19:43:18 UTC (rev 531)
+++ trunk/import_members.pl	2006-11-12 19:53:08 UTC (rev 532)
@@ -38,8 +38,17 @@
 	exit;
 }
 
-my $membersfile = 'users/members';
+my $membersfile = $ARGV[0];
 
+if (length($membersfile) < 2){
+
+    print "\nUsage: import_members.pl path/to/members\n\n";
+	print "You must supply the path to the members file. Default location\n";
+	print "is users/members. In this case do this:\n\n";
+	print "  ./import_members.pl users/members\n\n";
+	exit;
+}
+
 my @users = ();
 
 open(FH, "$membersfile") || die ("Couldn't open members file!");
@@ -84,6 +93,8 @@
 
 close(FH);
 
+print "\n\nParsing members file completed. Now trying to import user data.\n\n";
+
 foreach (@users) {
 
 	$myUser = $member{$_};


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.