mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
fix: the auto-update plugin now also installs launchers and service files via setup.py (closes #470)
This commit is contained in:
@ -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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user