diff --git a/main.exe b/main.exe new file mode 100644 index 0000000..f941102 Binary files /dev/null and b/main.exe differ diff --git a/main.py b/main.py index 3c4f999..133335f 100644 --- a/main.py +++ b/main.py @@ -109,9 +109,9 @@ class packagemanager: elif args[1] == "install": self.install(args[2]) elif args[1] == "list": - self.list() + self.List() elif args[1] == "remove": - self.uninstall(args[2]) + self.uninstall(args[2:]) elif args[1] == "available": self.commands("./packages") else: @@ -164,17 +164,18 @@ class packagemanager: - def list(self): + def List(self): print("Installed Packages: \n"+ "\n".join([row[0] for row in Packages.packages])) - def uninstall(self, name:str): - #print(Packages.packages) - print(f"Uninstalling {name}") - for package in Packages.packages: - if name in package[0]: - Packages.packages.remove(package) - Packages.update(Packages.packages) - print(f"{color.green}Sucess:{color.white} Uninstalled {name}.") + def uninstall(self, package: list): + for name in package: + #print(Packages.packages) + print(f"Uninstalling {name}") + for package in Packages.packages: + if name in package[0]: + Packages.packages.remove(package) + Packages.update(Packages.packages) + print(f"{color.green}Sucess:{color.white} Uninstalled {name}.") diff --git a/packages/pakk.conf b/packages/pakk.conf index 3723315..32a4829 100644 --- a/packages/pakk.conf +++ b/packages/pakk.conf @@ -1 +1 @@ -[['builtin', 'packages.builtin', ['echo', 'ls', 'rm', 'clear', 'cd', 'll']], ['nano', 'packages.nano', ['nano']], ['netget', 'packages.netget', ['netget']], ['pip', 'packages.pip', ['pip']]] \ No newline at end of file +[['builtin', 'packages.builtin', ['echo', 'ls', 'rm', 'clear', 'cd', 'll']]] \ No newline at end of file