fix: the auto-update plugin now also installs launchers and service files via setup.py (closes #470)

This commit is contained in:
Simone Margaritelli
2019-10-31 12:48:15 +01:00
parent 279d885ec6
commit 783ac61594
10 changed files with 73 additions and 62 deletions

View File

@ -143,20 +143,9 @@ def install(display, update):
if not os.path.exists(source_path):
source_path = "%s-%s" % (source_path, update['available'])
# setup.py is going to install data files for us
os.system("cd %s && pip3 install ." % source_path)
data_path = os.path.join(source_path, "builder/data")
for source in glob.glob("%s/**" % data_path, recursive=True):
if os.path.isfile(source):
dest = source.replace(data_path, '')
dest_path = os.path.dirname(dest)
if not os.path.isdir(dest_path):
os.makedirs(dest_path)
logging.info("[update] installing %s to %s ..." % (source, dest))
os.system("mv '%s' '%s'" % (source, dest))
os.system("systemctl daemon-reload")
return True