summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Rayhawk <jrayhawk@omgwallhack.org>2011-06-01 02:29:48 -0700
committerJoe Rayhawk <jrayhawk@omgwallhack.org>2011-06-01 02:29:48 -0700
commit18c3275a222e57e6b98932e8e394646382b25388 (patch)
tree6fd986017aed1a2d72910634437f96540cd6e81e
parentce9bf0e09809dc6fe55c1ddfe909ae40c1c5bbcc (diff)
downloadpiny-code-18c3275a222e57e6b98932e8e394646382b25388.tar.gz
piny-code-18c3275a222e57e6b98932e8e394646382b25388.zip
Not the right place for this.
This reverts commit 6239ca4595858262ac42a5e743d76653c9e61c4a.
-rwxr-xr-xpinyadmin/sbin/newuser19
1 files changed, 4 insertions, 15 deletions
diff --git a/pinyadmin/sbin/newuser b/pinyadmin/sbin/newuser
index 2a349fd..e6dd785 100755
--- a/pinyadmin/sbin/newuser
+++ b/pinyadmin/sbin/newuser
@@ -4,10 +4,9 @@ use strict;
use warnings;
use Email::Valid::Loose qw( );
-use Getopt::Tabular qw( );
-#use Piny::Config;
-#use Piny::User;
+use Piny::Config;
+use Piny::User;
my ( $email, $username, $password );
@@ -20,20 +19,10 @@ my $checker = Email::Valid::Loose->new
, "-tldcheck" => 0
);
-my ( $batchmode, $disableikiwiki ) = ( 0, 0 );
-
-# Argument parsing.
-Getopt::Tabular::SetOptionPatterns( "(--)[\\w-]+", "(-)\\w" );
-Getopt::Tabular::SetHelpOption( "--help" );
-Getopt::Tabular::GetOptions(
- [ [ "--batch", "const", 1, \$batchmode, "enable batch mode, for use as a backend by other scripts" ]
- , [ "--disable-ikiwiki|--enable-ikiwiki", "boolean", 0, \$disableikiwiki, "disable creation of an ikiwiki site for this repo" ]
- ], \@ARGV ) or exit 0;
-
# Check to see if we're in batch mode.
-if ( $batchmode and scalar @ARGV == 2 ) {
+if ( scalar @ARGV == 3 and $ARGV[0] eq "--batch" ) {
- ( $email, $username ) = @ARGV;
+ ( undef, $email, $username ) = @ARGV;
$email = $checker->address( $email );