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

Annotation of /Sprout/SetPermissions.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (view) (download) (as text)

1 : parrello 1.1 #!/usr/bin/perl -w
2 :    
3 :     =head1 Fix Permissions
4 :    
5 : parrello 1.2 Fix the permissions for the current NMPDR complex.
6 : parrello 1.1
7 :     The currently-supported command-line options are as follows.
8 :    
9 :     =over 4
10 :    
11 :     =item user
12 :    
13 :     Name suffix to be used for log files. If omitted, the PID is used.
14 :    
15 :     =item trace
16 :    
17 :     Numeric trace level. A higher trace level causes more messages to appear. The
18 :     default trace level is 2. Tracing will be directly to the standard output
19 :     as well as to a C<trace>I<User>C<.log> file in the FIG temporary directory,
20 :     where I<User> is the value of the B<user> option above.
21 :    
22 :     =item sql
23 :    
24 :     If specified, turns on tracing of SQL activity.
25 :    
26 :     =item background
27 :    
28 :     Save the standard and error output to files. The files will be created
29 :     in the FIG temporary directory and will be named C<err>I<User>C<.log> and
30 :     C<out>I<User>C<.log>, respectively, where I<User> is the value of the
31 :     B<user> option above.
32 :    
33 :     =item group
34 :    
35 :     Name of the group to be assigned to the files and directories. The default
36 :     is C<fig>
37 :    
38 :     =item h
39 :    
40 :     Display this command's parameters and options.
41 :    
42 :     =back
43 :    
44 :     =cut
45 :    
46 :     use strict;
47 :     use Tracer;
48 :     use DocUtils;
49 :     use TestUtils;
50 :     use Cwd;
51 :     use File::Copy;
52 :     use File::Path;
53 :    
54 :     # Get the command-line options and parameters.
55 :     my ($options, @parameters) = StandardSetup([qw() ],
56 :     {
57 :     group => ['fig', 'group to be assigned to the files'],
58 :     },
59 : parrello 1.2 "",
60 : parrello 1.1 @ARGV);
61 :    
62 :     if (! $parameters[0]) {
63 :     Trace("Current directory selected.") if T(2);
64 :     } elsif (! -d $parameters[0]) {
65 :     Confess("Invalid directory $parameters[0] specified.");
66 :     } else {
67 :     ChDir($parameters[0]);
68 :     }
69 : parrello 1.2 Trace("Processing FIG directories.") if T(2);
70 : parrello 1.3 Tracer::SetPermissions($FIG_Config::fig_disk, $options->{group}, 02664, tmp => 02777);
71 : parrello 1.2 Trace("Processing cover pages.") if T(2);
72 : parrello 1.3 Tracer::SetPermissions($FIG_Config::nmpdr_pages, $options->{group}, 02664);
73 : parrello 1.1
74 :     1;

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3