Skip to content

Commit

Permalink
replaced double quotes with single quotes in script
Browse files Browse the repository at this point in the history
  • Loading branch information
andres-fr committed Nov 2, 2023
1 parent cce02d8 commit 95f252a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docker/scripts/singularity_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@
from spython.main.parse.writers import get_writer

# globals
ENTRY_POINT = "/bin/bash" # seems to be a good default
ENTRY_POINT = '/bin/bash' # seems to be a good default
FORCE = False # seems to be a good default
#
parser = argparse.ArgumentParser(description="Custom Singularity converter")
parser = argparse.ArgumentParser(description='Custom Singularity converter')
parser.add_argument('-i', '--input', type=str,
help="Docker input path", default="Dockerfile")
help='Docker input path', default='Dockerfile')
parser.add_argument('-o', '--output', type=str,
help="Singularity output path", default="Singularity.def")
help='Singularity output path', default='Singularity.def')
args = parser.parse_args()
INPUT_DOCKERFILE_PATH = args.input
OUTPUT_SINGULARITY_PATH = args.output

# create Docker parser and Singularity writer
parser = get_parser("docker")
writer = get_writer("singularity")
parser = get_parser('docker')
writer = get_writer('singularity')

# parse Dockerfile into Singularity and suppress %files commands
recipeParser = parser(INPUT_DOCKERFILE_PATH)
Expand All @@ -41,5 +41,5 @@

# convert to string and save to output file
result = recipeWriter.convert(runscript=ENTRY_POINT, force=FORCE)
with open(OUTPUT_SINGULARITY_PATH, "w") as f:
with open(OUTPUT_SINGULARITY_PATH, 'w') as f:
f.write(result)

0 comments on commit 95f252a

Please sign in to comment.