From 851bcf8428cacabf9efbddfa6f7a1f04a5ea249a Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Wed, 10 Jun 2015 18:06:21 +0200 Subject: [PATCH] scripts: small fixes --- scripts/switch_repo.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/switch_repo.php b/scripts/switch_repo.php index 87b2d6a8d..0e25b67f4 100755 --- a/scripts/switch_repo.php +++ b/scripts/switch_repo.php @@ -30,11 +30,11 @@ $pkg_mirror = 'http://pkg.opnsense.org'; $pkg_flavour = 'latest'; -if (isset($argv[1])) { +if (count($argv) > 1) { $pkg_flavour = $argv[1]; } -if (isset($argv[2])) { - $pkg_flavour = $argv[2]; +if (count($argv) > 2) { + $pkg_mirror = $argv[2]; } $pkg_sample = file_get_contents('/usr/local/etc/pkg/repos/OPNsense.conf.sample');