]> apps.delaporte.us Git - dotfiles.git/blobdiff - invoke/minetest/tasks.py
Fixup rmod
[dotfiles.git] / invoke / minetest / tasks.py
index e412a6796532a8429e71669c58a38697710332c1..3c39102c6a6dbddc513d08ecc72f447373f92aef 100644 (file)
@@ -114,8 +114,22 @@ def rmod(c, name):
         c.run(f"mv {mod_dir} {root}/mods_{bk}")
     else:
         print("Removing empty mod dir.")
         c.run(f"mv {mod_dir} {root}/mods_{bk}")
     else:
         print("Removing empty mod dir.")
-        c.run(f"rmdir {mod_dir}")
-    c.run(f"mv {root}/mods_{name} {mod_dir}")
+    c.run(f"mkdir -p {mod_dir}")
+    c.run(f"mv {root}/mods_{name}/* {mod_dir}/")
+    print(f"mods_{name} restored to mods")
+    print("ls of root")
     c.run(f"ls {root}")
     c.run(f"ls {root}")
+    print("ls of mods")
+    c.run(f"ls {root}/mods")
+
+@task
+def listmods(c):
+    print("ls of mods")
+    c.run(f"ls {root}/mods/")
+
+@task
+def logs(c, lines=20):
+    '''Output some logs'''
+    c.run(f"tail -n {lines} {root}/debug.txt")