Skip to content

Commit

Permalink
Merge branch 'master' of github.com:jaredhendrickson13/pfsense-api in…
Browse files Browse the repository at this point in the history
…to next_patch
  • Loading branch information
jaredhendrickson13 committed Sep 19, 2024
2 parents c6319f7 + 5f1d42a commit 4de4702
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tools/make_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def generate_makefile(self):

# Set Jijna2 environment and variables
j2_env = jinja2.Environment(
autoescape=jinja2.select_autoescape(None),
loader=jinja2.FileSystemLoader(searchpath=str(template_dir))
)
j2_env.filters["dirname"] = self.dirname
Expand Down Expand Up @@ -97,13 +98,13 @@ def generate_makefile(self):

def run_ssh_cmd(self, cmd):
"""Formats the SSH command to use when building on remote hosts."""
ssh_cmd = f"ssh {self.args.username}@{self.args.host} '{cmd}'"
return subprocess.call(ssh_cmd, shell=True)
ssh_cmd = ['ssh', f'{self.args.username}@{self.args.host}', f'"{cmd}"']
return subprocess.call(ssh_cmd, shell=False)

def run_scp_cmd(self, src, dst, recurse=False):
"""Formats the SCP command to use when copying over the built package."""
scp_cmd = f"scp {'-r' if recurse else ''} {src} {dst}"
return subprocess.call(scp_cmd, shell=True)
scp_cmd = ['scp', '-r' if recurse else '', src, dst]
return subprocess.call(scp_cmd, shell=False)

def build_package(self, pkg_dir):
"""Builds the package when the local system is FreeBSD."""
Expand Down

0 comments on commit 4de4702

Please sign in to comment.