Changeset 431 for wiki-toolkit/trunk/bin/wiki-toolkit-rename-node
- Timestamp:
- 05/11/08 17:04:41 (4 years ago)
- Files:
-
- 1 modified
-
wiki-toolkit/trunk/bin/wiki-toolkit-rename-node (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wiki-toolkit/trunk/bin/wiki-toolkit-rename-node
r398 r431 13 13 "oldname=s" => \$oldname, 14 14 "newname=s" => \$newname, 15 );15 ); 16 16 17 17 unless (defined($dbtype)) { … … 28 28 29 29 unless (defined($oldname)) { 30 print "You must supply the old node name with the --oldname option.\n";31 print "Further help can be found by typing 'perldoc $0'\n";32 exit 1;30 print "You must supply the old node name with the --oldname option.\n"; 31 print "Further help can be found by typing 'perldoc $0'\n"; 32 exit 1; 33 33 } 34 34 35 35 unless (defined($newname)) { 36 print "You must supply the new node name with the --newname option.\n";37 print "Further help can be found by typing 'perldoc $0'\n";38 exit 1;36 print "You must supply the new node name with the --newname option.\n"; 37 print "Further help can be found by typing 'perldoc $0'\n"; 38 exit 1; 39 39 } 40 40 … … 45 45 46 46 my %setup_modules = ( postgres => "Wiki::Toolkit::Store::Pg", 47 mysql => "Wiki::Toolkit::Store::MySQL",48 sqlite => "Wiki::Toolkit::Store::SQLite"47 mysql => "Wiki::Toolkit::Store::MySQL", 48 sqlite => "Wiki::Toolkit::Store::SQLite" 49 49 ); 50 50 … … 67 67 my $store; 68 68 my $args = "dbname=>'$dbname', dbuser=>'$dbuser'"; 69 if($dbpass) { $args .= ", dbpass=>'$dbpass'"; } 70 if($dbhost) { $args .= ", dbhost=>'$dbhost'"; } 71 if($dbport) { $args .= ", dbport=>'$dbport'"; } 69 if($dbpass) { 70 $args .= ", dbpass=>'$dbpass'"; 71 } 72 if($dbhost) { 73 $args .= ", dbhost=>'$dbhost'"; 74 } 75 if($dbport) { 76 $args .= ", dbport=>'$dbport'"; 77 } 72 78 eval "\$store = $class->new($args);"; 73 79 … … 81 87 print "Renamed '$oldname' to '$newname'\n"; 82 88 83 84 89 =head1 NAME 85 90 … … 92 97 93 98 wiki-toolkit-rename-node --type postgres 94 --name mywiki \95 --user wiki \96 --pass wiki \97 --host 'db.example.com' \98 --port 123499 --oldname MyOldNodeName \100 --nemname FancyNewNodeName99 --name mywiki \ 100 --user wiki \ 101 --pass wiki \ 102 --host 'db.example.com' \ 103 --port 1234 104 --oldname MyOldNodeName \ 105 --nemname FancyNewNodeName 101 106 102 107 =head1 DESCRIPTION
