parameters: (args)
docstring: Main program.
  
      Arguments:
          args: command line arguments
docstring_summary: Main program.
docstring_tokens: Main program .
function: def main(args):
      """Main program.
  
      Arguments:
          args: command line arguments
      """
      # Check if git is available.
      checkfor(['git', '--version'])
      # Check if .git exists
      if not os.access('.git', os.F_OK):
          print('No .git directory found!')
          sys.exit(1)
      print('{}: Updating modified files.'.format(args[0]))
      # Get modified files
      files = modifiedfiles()
      if not files:
          print('{}: No modified files.'.format(args[0]))
          sys.exit(0)
      files.sort()
      # Find files that have keywords in them
      kwfn = keywordfiles(files)
      if not kwfn:
          print('{}: No keyword files modified.'.format(args[0]))
          sys.exit(0)
      for fn in kwfn:
          os.remove(fn)
      sargs = ['git', 'checkout', '-f'] + kwfn
      subprocess.call(sargs)
function_tokens: def main ( args ) : # Check if git is available. checkfor ( [ 'git' , '--version' ] ) # Check if .git exists if not os . access ( '.git' , os . F_OK ) : print ( 'No .git directory found!' ) sys . exit ( 1 ) print ( '{}: Updating modified files.' . format ( args [ 0 ] ) ) # Get modified files files = modifiedfiles ( ) if not files : print ( '{}: No modified files.' . format ( args [ 0 ] ) ) sys . exit ( 0 ) files . sort ( ) # Find files that have keywords in them kwfn = keywordfiles ( files ) if not kwfn : print ( '{}: No keyword files modified.' . format ( args [ 0 ] ) ) sys . exit ( 0 ) for fn in kwfn : os . remove ( fn ) sargs = [ 'git' , 'checkout' , '-f' ] + kwfn subprocess . call ( sargs )