Tidy up chkstow code and documentation.
This commit is contained in:
parent
6b815a9a90
commit
1f41616b12
2 changed files with 57 additions and 46 deletions
|
@ -8,10 +8,12 @@ require 5.6.1;
|
|||
use File::Find;
|
||||
use Getopt::Long;
|
||||
|
||||
our $Wanted = \&bad_links;
|
||||
our %Package=();
|
||||
my $DEFAULT_TARGET = '/usr/local/';
|
||||
|
||||
our $Wanted = \&bad_links;
|
||||
our %Package = ();
|
||||
our $Stow_dir = '';
|
||||
our $Target = q{/usr/local/};
|
||||
our $Target = $DEFAULT_TARGET;
|
||||
|
||||
# put the main loop into a block so that tests can load this as a module
|
||||
if ( not caller() ) {
|
||||
|
@ -38,11 +40,13 @@ sub usage {
|
|||
USAGE: chkstow [options]
|
||||
|
||||
Options:
|
||||
-b, --badlinks Report symlinks that point to non-existant files.
|
||||
-a, --aliens Report non-symlinks in the target directory.
|
||||
-l, --list List packages in the target directory.
|
||||
-t DIR, --target=DIR Set the target directory to DIR (default
|
||||
is /usr/local)
|
||||
-t DIR, --target=DIR Set the target directory to DIR
|
||||
(default is $DEFAULT_TARGET)
|
||||
-b, --badlinks Report symlinks that point to non-existent files
|
||||
-a, --aliens Report non-symlinks in the target directory
|
||||
-l, --list List packages in the target directory
|
||||
|
||||
--badlinks is the default mode.
|
||||
EOT
|
||||
exit(0);
|
||||
}
|
||||
|
@ -104,5 +108,6 @@ sub list {
|
|||
|
||||
# Local variables:
|
||||
# mode: perl
|
||||
# cperl-indent-level: 4
|
||||
# End:
|
||||
# vim: ft=perl
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue