From 453caf26bf1d456f70d1dd94c2abc6e2c6bf48c1 Mon Sep 17 00:00:00 2001 From: "Bradley M. Kuhn" Date: Wed, 30 Dec 2015 03:17:33 -0800 Subject: [PATCH] exit on wrong number of args. --- scripts/db-convert-0.1-to-0.2.plx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/db-convert-0.1-to-0.2.plx b/scripts/db-convert-0.1-to-0.2.plx index d4185f4..d1b487f 100644 --- a/scripts/db-convert-0.1-to-0.2.plx +++ b/scripts/db-convert-0.1-to-0.2.plx @@ -7,6 +7,11 @@ use DBI; use Encode qw(encode decode); use Supporters; +if (@ARGV != 2) { + print STDERR "usage: $0 \n"; + exit 1; +} + my($OLD_SUPPORTERS_SQLITE_DB_FILE, $NEW_SUPPORTERS_SQLITE_DB_FILE) = @ARGV; my $dbhOld = DBI->connect("dbi:SQLite:dbname=$OLD_SUPPORTERS_SQLITE_DB_FILE", "", "",