summaryrefslogtreecommitdiff
path: root/bin/checklinks
diff options
context:
space:
mode:
Diffstat (limited to 'bin/checklinks')
-rwxr-xr-xbin/checklinks11
1 files changed, 4 insertions, 7 deletions
diff --git a/bin/checklinks b/bin/checklinks
index fee8814..1ac0953 100755
--- a/bin/checklinks
+++ b/bin/checklinks
@@ -1,5 +1,5 @@
#!/usr/bin/env perl
-## Copyright (C) 2008 by Daniel Friesel <derf@derf.homelinux.org>
+## Copyright © 2008-2009 by Daniel Friesel <derf@derf.homelinux.org>
## License: WTFPL <http://sam.zoy.org/wtfpl>
use strict;
use warnings;
@@ -122,15 +122,12 @@ sub mkdirs {
sub print_format {
my ($message, $src, $dst, $color) = @_;
- $message .= ' 'x(9-length($message));
- $src .= ' 'x(15-length($src));
- $dst .= ' 'x(15-length($dst));
if (defined($color)) {
- print colored ($message, $color);
+ printf(colored('%-9s', $color), $message);
} else {
- print $message;
+ printf('%-9s', $message);
}
- print "$src -> $dst\n";
+ printf(" %-15s -> %-15s\n", $src, $dst);
}
__END__