diff options
Diffstat (limited to 'rt/sbin')
-rw-r--r-- | rt/sbin/extract-message-catalog | 6 | ||||
-rw-r--r-- | rt/sbin/factory | 4 | ||||
-rw-r--r-- | rt/sbin/license_tag | 16 | ||||
-rwxr-xr-x | rt/sbin/rt-attributes-viewer | 2 | ||||
-rwxr-xr-x | rt/sbin/rt-clean-sessions | 2 | ||||
-rwxr-xr-x | rt/sbin/rt-dump-database | 2 | ||||
-rwxr-xr-x | rt/sbin/rt-email-dashboards | 4 | ||||
-rwxr-xr-x | rt/sbin/rt-email-digest | 2 | ||||
-rwxr-xr-x | rt/sbin/rt-email-group-admin | 2 | ||||
-rwxr-xr-x | rt/sbin/rt-server | 2 | ||||
-rw-r--r-- | rt/sbin/rt-setup-database | 4 | ||||
-rw-r--r-- | rt/sbin/rt-setup-database.in | 2 | ||||
-rwxr-xr-x | rt/sbin/rt-shredder | 2 | ||||
-rw-r--r-- | rt/sbin/rt-test-dependencies | 8 | ||||
-rwxr-xr-x | rt/sbin/rt-validator | 5 | ||||
-rw-r--r-- | rt/sbin/rt-validator.in | 3 |
16 files changed, 34 insertions, 32 deletions
diff --git a/rt/sbin/extract-message-catalog b/rt/sbin/extract-message-catalog index 022b5b2a9..f6a7f8505 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 ebe93b6e2..a1d1f3e34 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 26dd38052..9ddf82e2d 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 ec9143a0b..1ae83217b 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 c1046ead3..c3dc20143 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 847377138..f460e8648 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 a5c6ee06d..b64ccd843 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 1444fbdd3..e26dde890 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 c8a148250..169ef9ab6 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 6ee001de0..f932ce8b4 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 1f231d3a8..f413982ab 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 9760c54a4..2817ba35c 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 732daac4e..3a9db9d24 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 7957a48be..18e7c06aa 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 754438ee9..d0ba1a71e 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 579d730d9..9f8ff2927 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; |