mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-29 20:34:22 +01:00
Updated for colors
This commit is contained in:
parent
b563a6908b
commit
7025e912b6
1 changed files with 4 additions and 4 deletions
|
@ -116,19 +116,19 @@ class NewConfig:
|
||||||
""" Copy tne slpkg.toml.new file and rename the old to .orig. """
|
""" Copy tne slpkg.toml.new file and rename the old to .orig. """
|
||||||
if self.slpkg_config.is_file():
|
if self.slpkg_config.is_file():
|
||||||
shutil.copy(self.slpkg_config, f"{self.slpkg_config}.orig")
|
shutil.copy(self.slpkg_config, f"{self.slpkg_config}.orig")
|
||||||
print(f"\ncp {self.slpkg_config} -> {self.slpkg_config}.orig")
|
print(f"\ncp {self.green}{self.slpkg_config}{self.endc} -> {self.slpkg_config}.orig")
|
||||||
|
|
||||||
shutil.move(self.slpkg_config_new, self.slpkg_config)
|
shutil.move(self.slpkg_config_new, self.slpkg_config)
|
||||||
print(f"mv {self.slpkg_config_new} -> {self.slpkg_config}")
|
print(f"mv {self.slpkg_config_new} -> {self.green}{self.slpkg_config}{self.endc}")
|
||||||
|
|
||||||
def overwrite_blacklist_file(self):
|
def overwrite_blacklist_file(self):
|
||||||
""" Copy tne blacklist.toml.new file and rename the old to .orig. """
|
""" Copy tne blacklist.toml.new file and rename the old to .orig. """
|
||||||
if self.blacklist_config.is_file():
|
if self.blacklist_config.is_file():
|
||||||
shutil.copy(self.blacklist_config, f"{self.blacklist_config}.orig")
|
shutil.copy(self.blacklist_config, f"{self.blacklist_config}.orig")
|
||||||
print(f"\ncp {self.blacklist_config} -> {self.blacklist_config}.orig")
|
print(f"\ncp {self.green}{self.blacklist_config}{self.endc} -> {self.blacklist_config}.orig")
|
||||||
|
|
||||||
shutil.move(self.blacklist_config_new, self.blacklist_config)
|
shutil.move(self.blacklist_config_new, self.blacklist_config)
|
||||||
print(f"mv {self.blacklist_config_new} -> {self.blacklist_config}")
|
print(f"mv {self.blacklist_config_new} -> {self.green}{self.blacklist_config}{self.endc}")
|
||||||
|
|
||||||
def remove(self):
|
def remove(self):
|
||||||
""" Removes the .new files. """
|
""" Removes the .new files. """
|
||||||
|
|
Loading…
Add table
Reference in a new issue