aboutsummaryrefslogtreecommitdiff
path: root/bin/updateblddir
blob: 34f148dedc0b95cf64d98e71e47c12f8d60a86c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/python

import os

ROOT    = "/home/nolln/root"
SRC     = "sys"
BUILD   = "build"
IGNORED = ["build", "include", "lib", "bin", ".git", "vendor", "obj", "dep", ".generated"]

if __name__ == "__main__":
    for root, dirs, _ in os.walk(f"{ROOT}/{SRC}"):
        dirs[:] = [d for d in dirs if d not in IGNORED]
        blddir  = f"{ROOT}/{BUILD}/{root[len(ROOT)+len(SRC)+2:]}"
        if not os.path.exists(blddir):
            os.mkdir(blddir)