summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/checklinks22
-rw-r--r--test/checklinks2
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