summaryrefslogtreecommitdiffstats
path: root/script
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2017-05-28 20:43:11 +0200
committerFlorian Pritz <bluewind@xinu.at>2017-05-28 20:43:11 +0200
commit0da74ef431b39b4280150e9e2b6dea8632821973 (patch)
tree59dc4374aa84c931ab9139aa1c6cdc71d3cc33be /script
parent636b361a019ab4e4b4f3960d2aeca33b7be7a8cb (diff)
downloadApp-BorgRestore-0da74ef431b39b4280150e9e2b6dea8632821973.tar.gz
App-BorgRestore-0da74ef431b39b4280150e9e2b6dea8632821973.tar.xz
Output usage earlier when called without arguments
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'script')
-rwxr-xr-xscript/borg-restore.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/script/borg-restore.pl b/script/borg-restore.pl
index 923732b..5ee080f 100755
--- a/script/borg-restore.pl
+++ b/script/borg-restore.pl
@@ -196,6 +196,8 @@ sub main {
GetOptions(\%opts, "help|h", "debug", "update-cache|u", "destination|d=s", "time|t=s", "adhoc") or pod2usage(2);
pod2usage(0) if $opts{help};
+ pod2usage(-verbose => 0) if (@ARGV== 0);
+
if ($opts{debug}) {
my $logger = Log::Log4perl->get_logger('');
$logger->level($DEBUG);
@@ -210,8 +212,6 @@ sub main {
return 0;
}
- pod2usage(-verbose => 0) if (@ARGV== 0);
-
my @paths = @ARGV;
my $path;