#NEWLINE# def _run_recipe( work_dir , recipe_cmds , recipe_type ) : #NEWLINE# #INDENT# 'Create a bash script and run the recipe to download data.\n    ' #NEWLINE# assert ( recipe_type == 'bash' ) , 'Can only currently run bash recipes' #NEWLINE# run_file = os . path . join ( work_dir , 'ggd-run.sh' ) #NEWLINE# with open ( run_file , 'w' ) as out_handle : #NEWLINE# #INDENT# out_handle . write ( ( '#!/bin/bash\nset -eu -o pipefail\nexport PATH=%s/bin:$PATH\n' % env . system_install ) ) #NEWLINE# out_handle . write ( '\n' . join ( recipe_cmds ) ) #NEWLINE# #UNINDENT# subprocess . check_output ( [ 'bash' , run_file ] )