diff options
author | Minteck <contact@minteck.org> | 2022-04-23 11:55:05 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-04-23 11:55:05 +0200 |
commit | 7befc0df20149161018f1ff06a879366831c45fa (patch) | |
tree | b8ab8d0c4ab0fff02d5f6cd2976cbf8ee848f957 /includes/fetcher/index.js | |
parent | b35b6f19fe10f833c93f3475cecffa83ab3d9e22 (diff) | |
download | ember-7befc0df20149161018f1ff06a879366831c45fa.tar.gz ember-7befc0df20149161018f1ff06a879366831c45fa.tar.bz2 ember-7befc0df20149161018f1ff06a879366831c45fa.zip |
Dedupper
Diffstat (limited to 'includes/fetcher/index.js')
-rw-r--r-- | includes/fetcher/index.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/includes/fetcher/index.js b/includes/fetcher/index.js index 4d1dbbf..43357c8 100644 --- a/includes/fetcher/index.js +++ b/includes/fetcher/index.js @@ -213,6 +213,16 @@ console.log("Done fetching, found " + Object.keys(projects).length + " projects"); } + let known = []; + fs.writeFileSync("./projects.json", JSON.stringify(JSON.parse(fs.readFileSync('./projects.json').toString()).map((i) => { + if (!known.includes(i.gitlab_id)) { + known.push(i.gitlab_id); + return i; + } else { + return null; + } + }).filter(i => i !== null), null, 4)); + if (fs.existsSync("personal")) fs.rmSync("personal", { recursive: true }) console.log("Cloning minteck/minteck from GitHub..."); cp.execSync("git clone https://github.com/minteck/minteck personal"); |