From 6a47d363039162b4a25cf191359fed7b8ad022c2 Mon Sep 17 00:00:00 2001 From: Sean Buckley Date: Thu, 23 Mar 2023 15:38:34 -0400 Subject: [PATCH] deploy: refactor main --- pkgs/deploy/deploy.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/deploy/deploy.py b/pkgs/deploy/deploy.py index eb9bca6..37f86fc 100755 --- a/pkgs/deploy/deploy.py +++ b/pkgs/deploy/deploy.py @@ -156,19 +156,20 @@ def rexec(hosts, cmd): def main(): op = argv[1] - args = argv[2:] + hosts = expand(argv[2]) + args = argv[3:] if op in ["boot", "switch", "test"]: - apply(op, expand(args[0])) + apply(op, hosts) elif op == "check": - check(expand(args[0])) + check(hosts) elif op == "push": - push(expand(args[0])) + push(hosts) elif op == "exec": - rexec(expand(args[0]), args[1:]) + rexec(hosts, args) else: print("Invalid op:", op)