aboutsummaryrefslogtreecommitdiff
path: root/includes/fetcher/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'includes/fetcher/index.js')
-rw-r--r--includes/fetcher/index.js10
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");