projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT 4.0.22
[freeside.git]
/
rt
/
sbin
/
rt-shredder
diff --git
a/rt/sbin/rt-shredder
b/rt/sbin/rt-shredder
index
732daac
..
27d57a2
100755
(executable)
--- a/
rt/sbin/rt-shredder
+++ b/
rt/sbin/rt-shredder
@@
-1,9
+1,9
@@
-#!/
Users/falcone/perl5/perlbrew
/bin/perl
+#!/
usr
/bin/perl
# BEGIN BPS TAGGED BLOCK {{{
#
# COPYRIGHT:
#
# BEGIN BPS TAGGED BLOCK {{{
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-201
1
Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-201
4
Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@
-74,11
+74,11
@@
should wipeout.
=head2 --sqldump <filename>
=head2 --sqldump <filename>
-Outputs INSERT que
i
ries into file. This dump can be used to restore data
+Outputs INSERT queries into file. This dump can be used to restore data
after wiping out.
after wiping out.
-By default creates files
-F<< <RT_home>/var/data/RT-Shredder/<ISO_date>-XXXX.sql >>
+By default creates files
named F<< <ISO_date>-XXXX.sql >> in the current
+directory.
=head2 --object (DEPRECATED)
=head2 --object (DEPRECATED)
@@
-113,7
+113,7
@@
use warnings FATAL => 'all';
# fix lib paths, some may be relative
BEGIN {
require File::Spec;
# fix lib paths, some may be relative
BEGIN {
require File::Spec;
- my @libs = ("
lib", "
local/lib");
+ my @libs = ("
/opt/rt3/lib", "/opt/rt3/
local/lib");
my $bin_path;
for my $lib (@libs) {
my $bin_path;
for my $lib (@libs) {
@@
-135,7
+135,10
@@
BEGIN {
}
}
-use RT::Shredder ();
+use RT -init;
+
+require RT::Shredder;
+
use Getopt::Long qw(GetOptions);
use File::Spec ();
use Getopt::Long qw(GetOptions);
use File::Spec ();
@@
-146,8
+149,7
@@
our %plugins = RT::Shredder::Plugin->List;
our %opt;
parse_args();
our %opt;
parse_args();
-RT::Shredder::Init( %opt );
-my $shredder = new RT::Shredder;
+my $shredder = RT::Shredder->new;
{
my $plugin = eval { $shredder->AddDumpPlugin( Arguments => {
{
my $plugin = eval { $shredder->AddDumpPlugin( Arguments => {
@@
-257,7
+259,7
@@
sub process_plugins
my @res;
foreach my $str( @{ $opt{'plugin'} } ) {
my @res;
foreach my $str( @{ $opt{'plugin'} } ) {
- my $plugin =
new RT::Shredder::Plugin
;
+ my $plugin =
RT::Shredder::Plugin->new
;
my( $status, $msg ) = $plugin->LoadByString( $str );
unless( $status ) {
print STDERR "Couldn't load plugin\n";
my( $status, $msg ) = $plugin->LoadByString( $str );
unless( $status ) {
print STDERR "Couldn't load plugin\n";