mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-18 10:26:29 +01:00
update setup
This commit is contained in:
parent
b9a42d3778
commit
624059f662
1 changed files with 11 additions and 2 deletions
11
setup.py
11
setup.py
|
@ -31,6 +31,8 @@ from slpkg.__metadata__ import (
|
|||
__email__,
|
||||
__author__
|
||||
)
|
||||
from slpkg.checksum import md5sum
|
||||
|
||||
|
||||
try:
|
||||
from setuptools import setup
|
||||
|
@ -93,5 +95,12 @@ if "install" in sys.argv:
|
|||
if not os.path.exists(conf_path):
|
||||
os.system("mkdir -p {0}".format(conf_path))
|
||||
for conf in conf_file:
|
||||
print("Installing '{0}' file".format(conf.split("/")[-1]))
|
||||
filename = conf.split("/")[-1]
|
||||
print("Installing '{0}' file".format(filename))
|
||||
if os.path.isfile(conf_path + filename):
|
||||
old = md5sum(conf_path + filename)
|
||||
new = md5sum(conf)
|
||||
if old != new:
|
||||
shutil.copy2(conf, conf_path + filename + ".new")
|
||||
else:
|
||||
shutil.copy2(conf, conf_path)
|
||||
|
|
Loading…
Reference in a new issue