old_contents: #!/usr/bin/env python
  import os
  import sys
  import json
  import subprocess
  
  def get_fileset(fs):
      print fs
      if not os.path.exists(fs["dir"]):
          subprocess.check_call(["git", "clone", fs["repo"], fs["dir"]])
      os.chdir(fs["dir"])
      subprocess.check_call(["git", "pull"])
      subprocess.check_call(["git", "annex", "merge"])
  
      subprocess.check_call(["git", "annex", "get"] + fs["files"])
  
  
  def get_filesets(filesets):
      data = json.load(open("filesets.json"))
      os.chdir("filesets")
      for fs in filesets:
          if fs in data:
              get_fileset(data[fs])
  
  if __name__ == "__main__":
      filesets = sys.argv[1].split(",")
      get_filesets(filesets)
  
new_contents: #!/usr/bin/env python
  import os
  import sys
  import json
  import subprocess
  
  def get_fileset(fs):
      if not os.path.exists(fs["dir"]):
          subprocess.check_call(["git", "clone", fs["repo"], fs["dir"]])
      os.chdir(fs["dir"])
      subprocess.check_call(["git", "pull"])
      subprocess.check_call(["git", "annex", "merge"])
  
      subprocess.check_call(["git", "annex", "get"] + fs["files"])
  
  
  def get_filesets(filesets):
      data = json.load(open("filesets.json"))
      os.chdir("filesets")
      for fs in filesets:
          if fs in data:
              get_fileset(data[fs])
  
  if __name__ == "__main__":
      filesets = sys.argv[1].split(",")
      get_filesets(filesets)
  
subject: remove print