summaryrefslogtreecommitdiff
path: root/rt/sbin
diff options
context:
space:
mode:
authorivan <ivan>2011-04-18 23:15:19 +0000
committerivan <ivan>2011-04-18 23:15:19 +0000
commit75162bb14b3e38d66617077843f4dfdcaf09d5c4 (patch)
treed89dd49a476cf2f0859ed6a0adc2992ea6d69d04 /rt/sbin
parentfc6209f398899f0211cfcedeb81a3cd65e04a941 (diff)
import rt 3.8.10
Diffstat (limited to 'rt/sbin')
-rw-r--r--rt/sbin/extract-message-catalog6
-rw-r--r--rt/sbin/factory4
-rw-r--r--rt/sbin/license_tag16
-rwxr-xr-xrt/sbin/rt-attributes-viewer2
-rwxr-xr-xrt/sbin/rt-clean-sessions2
-rwxr-xr-xrt/sbin/rt-dump-database2
-rwxr-xr-xrt/sbin/rt-email-dashboards4
-rwxr-xr-xrt/sbin/rt-email-digest2
-rwxr-xr-xrt/sbin/rt-email-group-admin2
-rwxr-xr-xrt/sbin/rt-server2
-rw-r--r--rt/sbin/rt-setup-database4
-rw-r--r--rt/sbin/rt-setup-database.in2
-rwxr-xr-xrt/sbin/rt-shredder2
-rw-r--r--rt/sbin/rt-test-dependencies8
-rwxr-xr-xrt/sbin/rt-validator5
-rw-r--r--rt/sbin/rt-validator.in3
16 files changed, 34 insertions, 32 deletions
diff --git a/rt/sbin/extract-message-catalog b/rt/sbin/extract-message-catalog
index 022b5b2..f6a7f85 100644
--- a/rt/sbin/extract-message-catalog
+++ b/rt/sbin/extract-message-catalog
@@ -120,7 +120,7 @@ sub extract_strings_from_code {
$filename =~ s'^\./'';
$filename =~ s'\.in$'';
- unless (open _, $file) {
+ unless (open _, '<', $file) {
print "Cannot open $file for reading ($!), skipping.\n";
return;
}
@@ -249,7 +249,7 @@ sub update {
print "Updating $lang...\n";
my @lines;
- @lines = (<LEXICON>) if open (LEXICON, $file);
+ @lines = (<LEXICON>) if open LEXICON, '<', $file;
@lines = grep { !/^(#(:|\.)\s*|$)/ } @lines;
while (@lines) {
my $msghdr = "";
@@ -343,7 +343,7 @@ sub update {
$out .= 'msgid ' . fmt($_) . "msgstr \"$Lexicon{$_}\"\n\n";
}
- open PO, ">$file" or die "Couldn't open '$file' for writing: $!";
+ open( PO, '>', $file ) or die "Couldn't open '$file' for writing: $!";
print PO $out;
close PO;
diff --git a/rt/sbin/factory b/rt/sbin/factory
index ebe93b6..a1d1f3e 100644
--- a/rt/sbin/factory
+++ b/rt/sbin/factory
@@ -452,11 +452,11 @@ $ClassAccessible
print "About to make $RecordClassPath, $CollectionClassPath\n";
`mkdir -p $path`;
- open( RECORD, ">$RecordClassPath" );
+ open( RECORD, '>', $RecordClassPath ) or die $!;
print RECORD $RecordClass;
close(RECORD);
- open( COL, ">$CollectionClassPath" );
+ open( COL, '>', $CollectionClassPath ) or die $!;
print COL $CollectionClass;
close(COL);
diff --git a/rt/sbin/license_tag b/rt/sbin/license_tag
index 26dd380..9ddf82e 100644
--- a/rt/sbin/license_tag
+++ b/rt/sbin/license_tag
@@ -113,7 +113,7 @@ sub tag_mason {
my $pm = $_;
return unless (-f $pm);
return if $pm =~ /images/ || $pm =~ /\.(?:png|jpe?g|gif)$/;
- open(FILE,"<$pm") || die "Failed to open $pm";
+ open( FILE, '<', $pm ) or die "Failed to open $pm";
my $file = (join "", <FILE>);
close (FILE);
print "$pm - ";
@@ -137,7 +137,7 @@ sub tag_mason {
- open (FILE, ">$pm") || die "couldn't write new file";
+ open( FILE, '>', $pm ) or die "couldn't write new file";
print FILE $file;
close FILE;
@@ -146,7 +146,7 @@ sub tag_mason {
sub tag_makefile {
my $pm = shift;
- open(FILE,"<$pm") || die "Failed to open $pm";
+ open( FILE, '<', $pm ) or die "Failed to open $pm";
my $file = (join "", <FILE>);
close (FILE);
print "$pm - ";
@@ -170,7 +170,7 @@ sub tag_makefile {
- open (FILE, ">$pm") || die "couldn't write new file";
+ open( FILE, '>', $pm ) or die "couldn't write new file";
print FILE $file;
close FILE;
@@ -180,7 +180,7 @@ sub tag_makefile {
sub tag_pm {
my $pm = $_;
next unless $pm =~ /\.pm/s;
- open(FILE,"<$pm") || die "Failed to open $pm";
+ open( FILE, '<', $pm ) or die "Failed to open $pm";
my $file = (join "", <FILE>);
close (FILE);
print "$pm - ";
@@ -204,7 +204,7 @@ sub tag_pm {
- open (FILE, ">$pm") || die "couldn't write new file $pm";
+ open( FILE, '>', $pm ) or die "couldn't write new file $pm";
print FILE $file;
close FILE;
@@ -214,7 +214,7 @@ sub tag_pm {
sub tag_script {
my $pm = $_;
return unless (-f $pm);
- open(FILE,"<$pm") || die "Failed to open $pm";
+ open( FILE, '<', $pm ) or die "Failed to open $pm";
my $file = (join "", <FILE>);
close (FILE);
print "$pm - ";
@@ -241,7 +241,7 @@ sub tag_script {
print "\n";
- open (FILE, ">$pm") || die "couldn't write new file";
+ open( FILE, '>', $pm ) or die "couldn't write new file";
print FILE $file;
close FILE;
diff --git a/rt/sbin/rt-attributes-viewer b/rt/sbin/rt-attributes-viewer
index ec9143a..1ae8321 100755
--- a/rt/sbin/rt-attributes-viewer
+++ b/rt/sbin/rt-attributes-viewer
@@ -1,4 +1,4 @@
-#!/Users/falcone/perl5/perlbrew/bin/perl
+#!/usr/bin/perl
# BEGIN BPS TAGGED BLOCK {{{
#
# COPYRIGHT:
diff --git a/rt/sbin/rt-clean-sessions b/rt/sbin/rt-clean-sessions
index c1046ea..c3dc201 100755
--- a/rt/sbin/rt-clean-sessions
+++ b/rt/sbin/rt-clean-sessions
@@ -1,4 +1,4 @@
-#!/Users/falcone/perl5/perlbrew/bin/perl
+#!/usr/bin/perl
# BEGIN BPS TAGGED BLOCK {{{
#
# COPYRIGHT:
diff --git a/rt/sbin/rt-dump-database b/rt/sbin/rt-dump-database
index 8473771..f460e86 100755
--- a/rt/sbin/rt-dump-database
+++ b/rt/sbin/rt-dump-database
@@ -1,4 +1,4 @@
-#!/Users/falcone/perl5/perlbrew/bin/perl -w
+#!/usr/bin/perl -w
# BEGIN BPS TAGGED BLOCK {{{
#
# COPYRIGHT:
diff --git a/rt/sbin/rt-email-dashboards b/rt/sbin/rt-email-dashboards
index a5c6ee0..b64ccd8 100755
--- a/rt/sbin/rt-email-dashboards
+++ b/rt/sbin/rt-email-dashboards
@@ -1,4 +1,4 @@
-#!/Users/falcone/perl5/perlbrew/bin/perl
+#!/usr/bin/perl
# BEGIN BPS TAGGED BLOCK {{{
#
# COPYRIGHT:
@@ -522,7 +522,7 @@ are taken to be in the user's timezone if available, UTC otherwise.
You'll need to have cron run this script every hour. Here's an example crontab
entry to do this.
- 0 * * * * /Users/falcone/perl5/perlbrew/bin/perl /opt/rt3/local/sbin/rt-email-dashboards
+ 0 * * * * /usr/bin/perl /opt/rt3/local/sbin/rt-email-dashboards
This will run the script every hour on the hour. This may need some further
tweaking to be run as the correct user.
diff --git a/rt/sbin/rt-email-digest b/rt/sbin/rt-email-digest
index 1444fbd..e26dde8 100755
--- a/rt/sbin/rt-email-digest
+++ b/rt/sbin/rt-email-digest
@@ -1,4 +1,4 @@
-#!/Users/falcone/perl5/perlbrew/bin/perl
+#!/usr/bin/perl
# BEGIN BPS TAGGED BLOCK {{{
#
# COPYRIGHT:
diff --git a/rt/sbin/rt-email-group-admin b/rt/sbin/rt-email-group-admin
index c8a1482..169ef9a 100755
--- a/rt/sbin/rt-email-group-admin
+++ b/rt/sbin/rt-email-group-admin
@@ -1,4 +1,4 @@
-#!/Users/falcone/perl5/perlbrew/bin/perl
+#!/usr/bin/perl
# BEGIN BPS TAGGED BLOCK {{{
#
# COPYRIGHT:
diff --git a/rt/sbin/rt-server b/rt/sbin/rt-server
index 6ee001d..f932ce8 100755
--- a/rt/sbin/rt-server
+++ b/rt/sbin/rt-server
@@ -1,4 +1,4 @@
-#!/Users/falcone/perl5/perlbrew/bin/perl -w
+#!/usr/bin/perl -w
# BEGIN BPS TAGGED BLOCK {{{
#
# COPYRIGHT:
diff --git a/rt/sbin/rt-setup-database b/rt/sbin/rt-setup-database
index 1f231d3..f413982 100644
--- a/rt/sbin/rt-setup-database
+++ b/rt/sbin/rt-setup-database
@@ -1,4 +1,4 @@
-#!/Users/falcone/perl5/perlbrew/bin/perl
+#!/usr/bin/perl
# BEGIN BPS TAGGED BLOCK {{{
#
# COPYRIGHT:
@@ -339,7 +339,7 @@ sub action_upgrade {
sub get_versions_from_to {
my ($base_dir, $from, $to) = @_;
- opendir my $dh, $base_dir or die "couldn't open dir: $!";
+ opendir( my $dh, $base_dir ) or die "couldn't open dir: $!";
my @versions = grep -d "$base_dir/$_" && /\d+\.\d+\.\d+/, readdir $dh;
closedir $dh;
diff --git a/rt/sbin/rt-setup-database.in b/rt/sbin/rt-setup-database.in
index 9760c54..2817ba3 100644
--- a/rt/sbin/rt-setup-database.in
+++ b/rt/sbin/rt-setup-database.in
@@ -339,7 +339,7 @@ sub action_upgrade {
sub get_versions_from_to {
my ($base_dir, $from, $to) = @_;
- opendir my $dh, $base_dir or die "couldn't open dir: $!";
+ opendir( my $dh, $base_dir ) or die "couldn't open dir: $!";
my @versions = grep -d "$base_dir/$_" && /\d+\.\d+\.\d+/, readdir $dh;
closedir $dh;
diff --git a/rt/sbin/rt-shredder b/rt/sbin/rt-shredder
index 732daac..3a9db9d 100755
--- a/rt/sbin/rt-shredder
+++ b/rt/sbin/rt-shredder
@@ -1,4 +1,4 @@
-#!/Users/falcone/perl5/perlbrew/bin/perl
+#!/usr/bin/perl
# BEGIN BPS TAGGED BLOCK {{{
#
# COPYRIGHT:
diff --git a/rt/sbin/rt-test-dependencies b/rt/sbin/rt-test-dependencies
index 7957a48..18e7c06 100644
--- a/rt/sbin/rt-test-dependencies
+++ b/rt/sbin/rt-test-dependencies
@@ -1,4 +1,4 @@
-#!/Users/falcone/perl5/perlbrew/bin/perl
+#!/usr/bin/perl
# BEGIN BPS TAGGED BLOCK {{{
#
# COPYRIGHT:
@@ -487,7 +487,7 @@ sub resolve_dep {
unless ( $configured ) {
print <<END;
You haven't configured the CPAN shell yet.
-Please run `/Users/falcone/perl5/perlbrew/bin/perl -MCPAN -e shell` to configure it.
+Please run `/usr/bin/perl -MCPAN -e shell` to configure it.
END
exit(1);
}
@@ -512,9 +512,9 @@ this situatation:
1) use a different tool to install dependencies by running setting the following
shell environment variable and rerunning this tool:
- RT_FIX_DEPS_CMD='/Users/falcone/perl5/perlbrew/bin/perl -MCPAN -e"install %s"'
+ RT_FIX_DEPS_CMD='/usr/bin/perl -MCPAN -e"install %s"'
2) Attempt to configure CPAN by running:
- `/Users/falcone/perl5/perlbrew/bin/perl -MCPAN -e shell` program from shell.
+ `/usr/bin/perl -MCPAN -e shell` program from shell.
If this fails, you may have to manually upgrade CPAN (see below)
3) Try to update the CPAN client. Download it from:
http://search.cpan.org/dist/CPAN and try again
diff --git a/rt/sbin/rt-validator b/rt/sbin/rt-validator
index 754438e..d0ba1a7 100755
--- a/rt/sbin/rt-validator
+++ b/rt/sbin/rt-validator
@@ -1,4 +1,4 @@
-#!/Users/falcone/perl5/perlbrew/bin/perl
+#!/usr/bin/perl
# BEGIN BPS TAGGED BLOCK {{{
#
# COPYRIGHT:
@@ -122,7 +122,8 @@ In any case it's highly recommended to have a backup before resolving anything.
Press enter to continue.
END
- <>;
+# Read a line of text, any line of text
+ <STDIN>;
}
use RT;
diff --git a/rt/sbin/rt-validator.in b/rt/sbin/rt-validator.in
index 579d730..9f8ff29 100644
--- a/rt/sbin/rt-validator.in
+++ b/rt/sbin/rt-validator.in
@@ -122,7 +122,8 @@ In any case it's highly recommended to have a backup before resolving anything.
Press enter to continue.
END
- <>;
+# Read a line of text, any line of text
+ <STDIN>;
}
use RT;