summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-03-01 21:48:13 +0100
committerDaniel Friesel <derf@finalrewind.org>2011-03-01 21:48:13 +0100
commit48da68f614a9da1b7f91b50a3e4c6655009e211e (patch)
tree1ceaa914f7baa32222551eca3a36d2b160ed0c93 /bin
parentef76ccd91ecddafb953554b6d4847a651e338d99 (diff)
Move -v/-h logic from App::Dthumb to bin/dthumb
Diffstat (limited to 'bin')
-rwxr-xr-xbin/dthumb13
1 files changed, 11 insertions, 2 deletions
diff --git a/bin/dthumb b/bin/dthumb
index bd27f5c..c39280a 100755
--- a/bin/dthumb
+++ b/bin/dthumb
@@ -4,6 +4,7 @@
# You just DO WHAT THE FUCK YOU WANT TO
use strict;
use warnings;
+use 5.010;
use autodie;
use App::Dthumb;
@@ -33,8 +34,16 @@ GetOptions(
my $dthumb = App::Dthumb->new(%{$opt});
my $timer = Time::Progress->new();
+if ($opt->{version}) {
+ say "dthumb version " . $dthumb->version();
+ exit 0;
+}
+if ($opt->{help}) {
+ exec('perldoc', '-F', $0);
+ die("Please see 'perldoc -F $0' or 'man dthumb'\n");
+}
+
-$dthumb->check_cmd_flags();
$dthumb->read_directories();
$dthumb->create_files();
$dthumb->delete_old_thumbnails();
@@ -69,7 +78,7 @@ B<dthumb> [I<options>]
=head1 VERSION
-This manual documents B<dthumb> version 0.1
+This manual documents B<dthumb> version 0.2
=head1 DESCRIPTION