""" * Author: "PeppermintOS Team(peppermintosteam@proton.me) * * License: SPDX-License-Identifier: GPL-3.0-or-later * * Move and copy files as needed """ import os import shutil from pathlib import Path import paths import conf # If you need to add additional paths you can do that as needed. # you are not limited to what is currently listed. BSTRING = paths.bstring_iso_configs home_folder = Path(BSTRING).expanduser() def copy_folders_files(): """" Copy all files and folders """ # Back to bubbles os.chdir(home_folder) # Set the working path wp_chroot = paths.WPCHROOT # Set the current working folder cur_dir = os.getcwd().replace('/', '/') shutil.copytree(cur_dir + paths.src_apps, wp_chroot + paths.des_apps, dirs_exist_ok=True ) #Temp Stop cantrell font #shutil.copytree(cur_dir + paths.src_font, # wp_chroot + paths.des_font, # dirs_exist_ok=True # ) shutil.copytree(cur_dir + paths.src_hooks_live, wp_chroot + paths.des_hooks_live, dirs_exist_ok=True ) shutil.copytree(cur_dir + paths.src_hooks_normal, cur_dir + paths.des_hooks_normal, dirs_exist_ok=True ) shutil.copytree(cur_dir + paths.src_issue, cur_dir + paths.des_issue, dirs_exist_ok=True ) shutil.copytree(cur_dir + paths.src_issue, wp_chroot + paths.des_issue_etc, dirs_exist_ok=True ) shutil.copytree(cur_dir + paths.src_issue, wp_chroot + paths.des_issues_opt, dirs_exist_ok=True ) shutil.copytree(cur_dir + paths.src_polkit, wp_chroot + paths.des_polkit, dirs_exist_ok=True ) shutil.copytree(cur_dir + paths.src_database, wp_chroot + paths.des_database, dirs_exist_ok=True ) shutil.copytree(cur_dir + paths.src_wallpaper, wp_chroot + paths.des_wallpaper, dirs_exist_ok=True ) shutil.copytree(cur_dir + paths.src_user_configs, wp_chroot + paths.des_user_configs, dirs_exist_ok=True ) shutil.copytree(cur_dir + paths.src_pixmaps, wp_chroot + paths.des_pixmaps, dirs_exist_ok=True ) shutil.copytree(cur_dir + paths.src_menu, wp_chroot + paths.des_menu, dirs_exist_ok=True ) shutil.copytree(cur_dir + paths.src_xfce, wp_chroot + paths.des_xfce, dirs_exist_ok=True ) shutil.copytree(cur_dir + paths.src_face, wp_chroot + paths.des_face, dirs_exist_ok=True ) shutil.copytree(cur_dir + paths.src_neo_fetch, wp_chroot + paths.des_neo_fetch, dirs_exist_ok=True ) shutil.copytree(cur_dir + paths.src_thunar, wp_chroot + paths.des_thunar, dirs_exist_ok=True ) shutil.copytree(cur_dir + paths.src_pmostools, wp_chroot + paths.des_pmostools, dirs_exist_ok=True ) shutil.copytree(cur_dir + paths.src_auto_start, wp_chroot + paths.des_auto_start, dirs_exist_ok=True ) shutil.copytree(cur_dir + paths.src_pylibs, wp_chroot + paths.des_pylibs, dirs_exist_ok=True ) shutil.copytree(cur_dir + paths.src_ply_lines, wp_chroot + paths.des_ply_lines, dirs_exist_ok=True ) shutil.copytree(cur_dir + paths.src_dbase_grub, wp_chroot + paths.des_dbase_grub, dirs_exist_ok=True ) shutil.copytree(cur_dir + paths.src_dbase_lockscreen, wp_chroot + paths.des_dbase_lockscreen, dirs_exist_ok=True ) shutil.copytree(cur_dir + paths.src_dbase_login, wp_chroot + paths.des_dbase_login, dirs_exist_ok=True ) shutil.copytree(cur_dir + paths.src_dbase_wallpaper, wp_chroot + paths.des_dbase_wallpaper, dirs_exist_ok=True ) shutil.copytree(cur_dir + paths.src_brand, wp_chroot + paths.des_brand, dirs_exist_ok=True ) blthcmd = conf.shell_copy_folders + BSTRING + paths.src_debian + BSTRING + paths.des_themes grthcmd = conf.shell_copy_folders + BSTRING + paths.src_manjaro + BSTRING + paths.des_themes rdthcmd = conf.shell_copy_folders + BSTRING + paths.src_peppermint + BSTRING + paths.des_themes blthcmd_dark = conf.shell_copy_folders + BSTRING + paths.src_debian_dark + BSTRING + paths.des_themes grthcmd_dark = conf.shell_copy_folders + BSTRING + paths.src_manjaro_dark + BSTRING + paths.des_themes rdthcmd_dark = conf.shell_copy_folders + BSTRING + paths.src_peppermint_dark + BSTRING + paths.des_themes os.system(blthcmd) os.system(grthcmd) os.system(rdthcmd) os.system(blthcmd_dark) os.system(grthcmd_dark) os.system(rdthcmd_dark) blicocmd = conf.shell_copy_folders + BSTRING + paths.src_tela_blue_dark + BSTRING + paths.des_icons gricocmd = conf.shell_copy_folders + BSTRING + paths.src_tela_green_dark + BSTRING + paths.des_icons rdicocmd = conf.shell_copy_folders + BSTRING + paths.src_tela_red_dark + BSTRING + paths.des_icons base_blicocmd = conf.shell_copy_folders + BSTRING + paths.src_tela_blue_base + BSTRING + paths.des_icons base_gricocmd = conf.shell_copy_folders + BSTRING + paths.src_tela_green_base + BSTRING + paths.des_icons base_rdicocmd = conf.shell_copy_folders + BSTRING + paths.src_tela_red_base + BSTRING + paths.des_icons nmicocmd = conf.shell_copy_folders + BSTRING + paths.src_tela + BSTRING + paths.des_icons os.system(blicocmd) os.system(gricocmd) os.system(rdicocmd) os.system(base_blicocmd) os.system(base_gricocmd) os.system(base_rdicocmd) os.system(nmicocmd)