diff --git a/lib/lum.lua b/lib/lum.lua index 7f5c5b8..b96bd20 100644 --- a/lib/lum.lua +++ b/lib/lum.lua @@ -34,4 +34,9 @@ end function install(package) io.write("Installing " .. package .. "\n") download_lua("packages/" .. package .. ".lua", bin_path .. package .. ".lua") +end + +function remove(package) + io.write("Removing " .. package .. "\n") + fs.delete(bin_path .. package .. ".lua") end \ No newline at end of file diff --git a/lum.lua b/lum.lua index 751d766..f27ea40 100644 --- a/lum.lua +++ b/lum.lua @@ -1,11 +1,6 @@ local args = { ... } local action = args[1] -if action == nil then - print("Usage: lum ") - return -end - if action == "install" then package = args[2] @@ -16,4 +11,17 @@ if action == "install" then lum.install(package) io.write("Done!\n") +elseif action == "remove" then + package = args[2] + if package == nil then + print("Usage: lum remove ") + return + end + + lum.remove(package) + io.write("Done!\n") +elseif action == "version" then + print("Lum version 0.1.0") +else + io.write("Usage: lum \n") end \ No newline at end of file