You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
336B

  1. import sys
  2. import json
  3. import os
  4. for filename in sys.argv[1:]:
  5. slug = os.path.splitext(os.path.basename(filename))[0]
  6. with open(filename, "r") as f:
  7. manifest = json.load(f)
  8. if os.path.exists("repos/" + slug):
  9. manifest['status'] = "available"
  10. else:
  11. next
  12. with open(filename, "w") as f:
  13. json.dump(manifest, f, indent=" ")