mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-26 09:30:37 +00:00
fix directory structure
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
import json
|
||||
import os
|
||||
|
||||
index = {}
|
||||
ext_index = {}
|
||||
os.chdir("control_files")
|
||||
for prefix in os.listdir("."):
|
||||
ext_index[prefix] = {}
|
||||
for file in os.listdir(prefix):
|
||||
with open(os.path.join(prefix, file), "r") as f:
|
||||
ext_name = file.replace(".control", "")
|
||||
control = f.read()
|
||||
index[ext_name] = {"path": f"{prefix}/{ext_name}.tar.gz", "control": control}
|
||||
ext_index[prefix][ext_name] = {"path": f"extensions/{prefix}/{ext_name}.tar.gz", "control": control}
|
||||
|
||||
with open("../ext_index.json", "w") as f:
|
||||
json.dump(ext_index, f)
|
||||
|
||||
with open("../control_index.json", "w") as f:
|
||||
json.dump(index, f)
|
||||
|
||||
Reference in New Issue
Block a user