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

View of /Sprout/SetPermissions.pl

Parent Directory Parent Directory | Revision Log Revision Log

Revision 1.4 - (download) (as text) (annotate)
Tue Oct 3 02:48:59 2006 UTC (13 years, 9 months ago) by parrello
Branch: MAIN
Changes since 1.3: +1 -0 lines
Fixed default trace level.

#!/usr/bin/perl -w

=head1 Fix Permissions

Fix the permissions for the current NMPDR complex.

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() ],
                                            trace => [2, 'tracing level'],
                                            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 {
Trace("Processing FIG directories.") if T(2);
Tracer::SetPermissions($FIG_Config::fig_disk, $options->{group}, 02664, tmp => 02777);
Trace("Processing cover pages.") if T(2);
Tracer::SetPermissions($FIG_Config::nmpdr_pages, $options->{group}, 02664);


MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3