Simple-Updater/index.js

15 lines
444 B
JavaScript
Raw Normal View History

2024-06-07 22:21:02 -05:00
const fs = require("fs"),
path = require("path")
var configsPath = path.join(__dirname, "config")
var confPath = path.join(configsPath, "config.json")
if (!fs.existsSync(configsPath)) {
fs.mkdirSync(configsPath)
}
if (!fs.existsSync(confPath)) {
console.log("It would appear you have not created a config file yet! Generating one now.")
fs.cpSync(path.join(__dirname, "defaults/config.json"), confPath)
console.log("Done!")
}