mirror of
https://github.com/imarkoff/Marble-shell-theme.git
synced 2025-09-17 08:47:55 -07:00
- Fully covered gresource orchestrator and it helpers with tests - Use abstract command runner INSTEAD OF SUBPROCESS in gresources - Replaced some subprocesses by builtin functions
22 lines
704 B
Python
22 lines
704 B
Python
import os
|
|
import shutil
|
|
|
|
from scripts.utils.logger.logger import LoggerFactory
|
|
|
|
|
|
class GresourceMover:
|
|
def __init__(self, source_file: str, destination_file: str, logger_factory: LoggerFactory):
|
|
self.source_file = source_file
|
|
self.destination_file = destination_file
|
|
self.logger_factory = logger_factory
|
|
|
|
def move(self):
|
|
move_line = self.logger_factory.create_logger()
|
|
move_line.update("Moving gresource files...")
|
|
|
|
os.makedirs(os.path.dirname(self.destination_file), exist_ok=True)
|
|
shutil.copyfile(self.source_file, self.destination_file)
|
|
os.chmod(self.destination_file, 0o644)
|
|
|
|
move_line.success("Moved gresource files.")
|