+updated_mods = f'{LOCAL_BACKUPS}/updated_mods'
+
+@task
+def repack_mod(c, mod):
+ unpacked_mods = f'{LOCAL_BACKUPS}/mods/unpack/'
+ tarfile = f'{updated_mods}/{mod}.tar'
+ c.run(f'tar cf {tarfile} --directory={unpacked_mods} {mod}')
+ c.run(f'mkdir -p {updated_mods}')
+ c.run(f'ls -l {updated_mods}')
+
+# @task(pre=[tasks.call(backup_mod, mod=mod)])
+@task
+def push_updated_mod(c, mod):
+ tmpdir = '/tmp/updated_mods'
+ c.run(f'{SSH} -C mkdir -p {tmpdir}')
+ c.run(f'scp {updated_mods}/{mod}.tar {USER_AT_IP}:{tmpdir}')
+ c.run(f'{SSH} -C ls -al {tmpdir}')
+ c.run(f'{SSH} -C tar xf {tmpdir}/{mod}.tar')
+ c.run(f'{SSH} -C ls -al {tmpdir}/root/luanti/mods')
+ c.run(f'{SSH} -C cp -r {tmpdir}/root/luanti/mods/{mod} {mods}')
+ c.run(f'{SSH} -C ls -al {mods}')
+