Skip to content

Commit

Permalink
Rename prepare_cmd to format_cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
wwahammy committed Jan 2, 2025
1 parent bb9aeba commit c97902d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions container-build.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def runProcess(exe):



parser = argparse.ArgumentParser(description='Build Sandstorm using an Ubuntu 20.04 Docker/OCI container')
parser = argparse.ArgumentParser(description='Setup and use a Sandstorm Docker/OCI build container.')
parser.add_argument("action", choices=["make", "prepare", "shell"], default="make", nargs="?", help='')
parser.add_argument('--container-builder', dest="container_builder", default='podman', help='Command you run for building container from command line (Default: %(default))')
parser.add_argument('--container-runner', dest="container_runner", default='podman', help='Command you run for running container from command line (Default: %(default))')
Expand All @@ -34,7 +34,7 @@ def prepare():
print(script)
runProcess(script)

def prepare_cmd(command):
def format_cmd(command):
return "{runner_cmd} run --rm -ti \
-v {pwd}:/sandstorm \
-v {pwd}/scripts/podman-entrypoint.sh:/podman-entrypoint.sh \
Expand All @@ -47,15 +47,13 @@ def prepare_cmd(command):
args=' '.join(args.args)
)

#

def make():
script = prepare_cmd("make")
script = format_cmd("make")
print(script)
runProcess(script)

def shell():
script = prepare_cmd("bash")
script = format_cmd("bash")
print(script)
runProcess(script)

Expand Down

0 comments on commit c97902d

Please sign in to comment.