def os_script(os_, vm_=None, opts=None, minion=''):
 if minion:
  minion = salt_config_to_yaml(minion)
 if os.path.isabs(os_):
  return __render_script(os_, vm_, opts, minion)
 if os.path.isabs('{0}.sh'.format(os_)):
  return __render_script('{0}.sh'.format(os_), vm_, opts, minion)
 for search_path in opts['deploy_scripts_search_path']:
  if os.path.isfile(os.path.join(search_path, os_)):
   return __render_script(os.path.join(search_path, os_), vm_, opts, minion)
  if os.path.isfile(os.path.join(search_path, '{0}.sh'.format(os_))):
   return __render_script(os.path.join(search_path, '{0}.sh'.format(os_)), vm_, opts, minion)
 return ''

def os_script ( os_ , vm_ = None , opts = None , minion = '' ) : if minion : minion = salt_config_to_yaml ( minion ) if os . path . isabs ( os_ ) : return __render_script ( os_ , vm_ , opts , minion ) if os . path . isabs ( '{0}.sh' . format ( os_ ) ) : return __render_script ( '{0}.sh' . format ( os_ ) , vm_ , opts , minion ) for search_path in opts [ 'deploy_scripts_search_path' ] : if os . path . isfile ( os . path . join ( search_path , os_ ) ) : return __render_script ( os . path . join ( search_path , os_ ) , vm_ , opts , minion ) if os . path . isfile ( os . path . join ( search_path , '{0}.sh' . format ( os_ ) ) ) : return __render_script ( os . path . join ( search_path , '{0}.sh' . format ( os_ ) ) , vm_ , opts , minion ) return ''
return the script as a string for the specific os .