Browse Source

Making call to getPackages a method call on the Repository

environments/development/deployments/48
Drew Short 7 years ago
parent
commit
31777068c4
  1. 4
      src/programs.cfg
  2. 7
      src/spm/spm.moon

4
src/programs.cfg

@ -7,10 +7,10 @@
name = "Sothr Package Manager",
description = "A Modified Package Manager For OpenOS",
authors = "WarrickSothr",
note = "SPM operates similarly to OPPM, with slight modifications to referential repositories",
note = "SPM operates in the spirit of OPPM, with significant modifications, performance improvements, and working with referential repositories",
hidden = false,
repo = "",
version = "0.2.1",
version = "0.3.6",
minified = {MINIFIED}
}
}

7
src/spm/spm.moon

@ -33,6 +33,9 @@ class Repository
return @src .. "/master"
@src
getPackages: =>
getPackages(@\getRepoPath!)
args, options = shell.parse(...)
printUsage = ->
@ -186,7 +189,7 @@ listPackages = (filter) ->
for _, repository in pairs(repositories)
print("Checking Repository " .. repository.src)
packages = getPackages(repository\getRepoPath!)
packages = repository\getPackages!
if packages == nil
io.stderr\write("Error while trying to receive package list for " .. repository.src .. "\n")
@ -243,7 +246,7 @@ getInformation = (requestedPackage) ->
return
for _, repository in pairs(repositories)
packages = getPackages(repository\getRepoPath!)
packages = repository\getPackages!
if packages == nil
io.stderr\write("Error while trying to receive package list for " .. repository.src .. "\n")

Loading…
Cancel
Save