tools/mac/power/generate_scripts.py
def generate_all(extra_args):
  """Delete all existing generated scripts. Scripts should not be
  modified by hand.
  """

  args = {"hash_bang": "#!/usr/bin/osascript"}
  args = {**args, **extra_args}

  shutil.rmtree("driver_scripts/", ignore_errors=True)
  os.makedirs("driver_scripts", exist_ok=True)

  # Generate scripts for all scenarios.
  render_runner_scripts(args)

  # Copy the files that don't need any substitutions.
  for _, _, files in os.walk("./driver_scripts_templates"):
    for script in files:
      if script.endswith(".scpt"):
        shutil.copyfile(f"./driver_scripts_templates/{script}",
                        f"./driver_scripts/{script}")
Delete all existing generated scripts. Scripts should not be
  modified by hand.
  
Delete all existing generated scripts. Scripts should not be
modified by hand.
Delete all existing generated scripts . Scripts should not be modified by hand .
def generate_all(extra_args):
  args = {"hash_bang": "#!/usr/bin/osascript"}
  args = {**args, **extra_args}
  shutil.rmtree("driver_scripts/", ignore_errors=True)
  os.makedirs("driver_scripts", exist_ok=True)
  render_runner_scripts(args)
  for _, _, files in os.walk("./driver_scripts_templates"):
    for script in files:
      if script.endswith(".scpt"):
        shutil.copyfile(f"./driver_scripts_templates/{script}",
                        f"./driver_scripts/{script}")
def generate_all ( extra_args ) : args = { "hash_bang" : "#!/usr/bin/osascript" } args = { ** args , ** extra_args } shutil . rmtree ( "driver_scripts/" , ignore_errors = True ) os . makedirs ( "driver_scripts" , exist_ok = True ) render_runner_scripts ( args ) for _ , _ , files in os . walk ( "./driver_scripts_templates" ) : for script in files : if script . endswith ( ".scpt" ) : shutil . copyfile ( f"./driver_scripts_templates/{script}" , f"./driver_scripts/{script}" )
Delete all existing generated scripts.
Delete all existing generated scripts .
"""Delete all existing generated scripts. Scripts should not be
  modified by hand.
  """ # Generate scripts for all scenarios. # Copy the files that don't need any substitutions.
extra_args