diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2009-07-05 16:22:41 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2009-07-05 16:22:41 +0200 |
commit | 1d7de82eb8e4343ae6e0099d5a44c9558869d54f (patch) | |
tree | 6cab5f539452ee52b7344c8bfbf98376f547bdb6 | |
parent | 60998207a949dd2044013daf0999fd175cdc4f65 (diff) |
checklinks: Added --msglevel option
-rwxr-xr-x | bin/checklinks | 22 | ||||
-rw-r--r-- | test/checklinks | 2 |
2 files changed, 16 insertions, 8 deletions
diff --git a/bin/checklinks b/bin/checklinks index 0bfe106..7e44be6 100755 --- a/bin/checklinks +++ b/bin/checklinks @@ -23,9 +23,10 @@ if (-f '.links') { } GetOptions( + 'm|msglevel=i' => \$msglevel, + 'p|parameter=s' => \%substitute, 'q|quiet' => sub {$msglevel = 1}, 'r|remove' => \$remove, - 'p|parameter=s' => \%substitute, ); open(my $links, '<', $linkfile) or die("Can't open $linkfile: $!"); @@ -153,13 +154,12 @@ Create or update links based on a file =over -=item B<-q>, B<--quiet> - -Quiet. Hide unchanged links +=item B<-m>, B<--msglevel>=I<level> -=item B<-r>, B<--remove> - -Remove all symlinks. Hardlinks will be left as they are. +Set the level of status messages. +If I<level> is B<0>, all will be shown. A level of 1 will filter out messages +which have a status of "ok" or "absolute", level 2 will filter anything except +"EXISTS" and "no dst", and anything higher will filter all output. =item B<-p>, B<--parameter> I<parameter>=I<value> @@ -168,6 +168,14 @@ When used in conjuction with pkg(1), $package will be set to the current package's relative path (as seen from $HOME, like C<packages/core>), and $etc will be set to $package/etc (like C<packages/core/etc>) +=item B<-q>, B<--quiet> + +Shortcut for C<< --msglevel=1 >> + +=item B<-r>, B<--remove> + +Remove all symlinks. Hardlinks will be left as they are. + =back =head1 OUTPUT diff --git a/test/checklinks b/test/checklinks index 81a75e2..5b70e27 100644 --- a/test/checklinks +++ b/test/checklinks @@ -8,7 +8,7 @@ cat > links <<- quux soft blub \$quux quux -alias checklinks='checklinks --parameter quux=flurbl' +alias checklinks='checklinks --parameter quux=flurbl --msglevel 99' echo barbl > bar echo flurbl > file |