feat(config): Clean up, add themes options
This commit is contained in:
+9
-7
@@ -8,21 +8,23 @@ def init(force: bool = False):
|
||||
dir = os.getcwd()
|
||||
script_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
if force:
|
||||
if confirm(False, "Do you really want to IRREVERSIBLY DELETE the contents of this folder and redo setup?"):
|
||||
if confirm(
|
||||
False,
|
||||
"Do you really want to IRREVERSIBLY DELETE the contents of this folder and redo setup?",
|
||||
):
|
||||
[os.remove(file) for file in os.listdir(dir)]
|
||||
git.init(dir)
|
||||
os.mkdir(dir + "/config")
|
||||
os.mkdir(dir + "/db")
|
||||
os.mkdir(dir + "/system")
|
||||
os.mkdir(dir + "/includes")
|
||||
shutil.copy(script_dir + "/templates/config/config.yml", dir + "/config.yml")
|
||||
shutil.copy(script_dir + "/templates/config/system/", dir + "/includes/system/")
|
||||
shutil.copy(script_dir + "/templates/config/templates/", dir + "/includes/templates/")
|
||||
shutil.copy(script_dir + "/templates/config.yml", dir + "/config.yml")
|
||||
shutil.copy(script_dir + "/templates/system/", dir + "/includes/system/")
|
||||
shutil.copy(script_dir + "/templates/templates/", dir + "/includes/templates/")
|
||||
shutil.copy(script_dir + "/templates/README.md", dir + "/README.md")
|
||||
print("Initialized a new archmgr repository")
|
||||
# TODO: Instead of copying things over, clone the template repo, then copy its contents to the new repo?
|
||||
# TODO: For the files, store the permissions in a db
|
||||
# TODO: Warn user to not delete .config/archmgr repo
|
||||
# TODO: Set up that repo (where to put it? /usr/share?)
|
||||
# TODO: Set up that repo (where to put it? /usr/share? or .config?)
|
||||
# TODO: Consider collecting function -> If no files present, will only collect the pkgs, else also the files
|
||||
# TODO: Config folder instead of single config file
|
||||
# TODO: Also store the folder name of the config folder in that repo (needs to be easily changeable for user!)
|
||||
|
||||
Reference in New Issue
Block a user