[Bio] / Sprout / SetPermissions.pl Repository:
ViewVC logotype

View of /Sprout/SetPermissions.pl

Parent Directory Parent Directory | Revision Log Revision Log

Revision 1.1 - (download) (as text) (annotate)
Thu Jun 8 13:40:47 2006 UTC (14 years, 1 month ago) by parrello
Branch: MAIN
Added to provide a way to fix the permissions in the NMPDR directories.

#!/usr/bin/perl -w

=head1 Fix Permissions

Fix the permissions in the specified directory and all its subdirectories.

The currently-supported command-line options are as follows.

=over 4

=item user

Name suffix to be used for log files. If omitted, the PID is used.

=item trace

Numeric trace level. A higher trace level causes more messages to appear. The
default trace level is 2. Tracing will be directly to the standard output
as well as to a C<trace>I<User>C<.log> file in the FIG temporary directory,
where I<User> is the value of the B<user> option above.

=item sql

If specified, turns on tracing of SQL activity.

=item background

Save the standard and error output to files. The files will be created
in the FIG temporary directory and will be named C<err>I<User>C<.log> and
C<out>I<User>C<.log>, respectively, where I<User> is the value of the
B<user> option above.

=item group

Name of the group to be assigned to the files and directories. The default
is C<fig>

=item h

Display this command's parameters and options.



use strict;
use Tracer;
use DocUtils;
use TestUtils;
use Cwd;
use File::Copy;
use File::Path;

# Get the command-line options and parameters.
my ($options, @parameters) = StandardSetup([qw() ],
                                            group => ['fig', 'group to be assigned to the files'],

if (! $parameters[0]) {
    Trace("Current directory selected.") if T(2);
} elsif (! -d $parameters[0]) {
    Confess("Invalid directory $parameters[0] specified.");
} else {
my $thisDir = getcwd();
Tracer::SetPermissions($thisDir, $options->{group}, 01664);


MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3