@ -57,8 +57,8 @@ getContent = (url) ->
return content
return content
-- Request repository information
-- Request repository information
getRepositories = ->
success, raw_repositories = pcall(getContent, defaultRepoLocationConfig )
getRepositories = (repoLocation) ->
success, raw_repositories = pcall(getContent, repoLocation )
if not success
if not success
io.stderr\write("Could not connect to the Internet. Please ensure you have an Internet connection.")
io.stderr\write("Could not connect to the Internet. Please ensure you have an Internet connection.")
@ -68,6 +68,13 @@ getRepositories = ->
repositories = {}
repositories = {}
for repositoryName, repository in pairs(deserialized_repositories)
for repositoryName, repository in pairs(deserialized_repositories)
if repository.link != nil
linked_repositories = getRepositories(repository.link)
for linkedRepositoryName, linkedRepository in pairs(linked_repositories)
repositories[linkedRepositoryName] = linkedRepository
continue
src = repository.src or nil
src = repository.src or nil
if src == nil
if src == nil
src = githubContentRoot .. repository.repo .."/master"
src = githubContentRoot .. repository.repo .."/master"
@ -154,7 +161,7 @@ listPackages = (filter) ->
packageTable = {}
packageTable = {}
print("Receiving Package list...")
print("Receiving Package list...")
if not options.i
if not options.i
success, repositories = pcall(getRepositories)
success, repositories = pcall(getRepositories, defaultRepoLocationConfig )
if not success or repositories == -1
if not success or repositories == -1
io.stderr\write("Unable to connect to the Internet.\n")
io.stderr\write("Unable to connect to the Internet.\n")
@ -216,7 +223,7 @@ printPackages = (packages) ->
-- Retrieve package information
-- Retrieve package information
getInformation = (requestedPackage) ->
getInformation = (requestedPackage) ->
success, repositories = pcall(getRepositories)
success, repositories = pcall(getRepositories, defaultRepoLocationConfig )
if not success or repositories == -1
if not success or repositories == -1
io.stderr\write("Unable to connect to the Internet.\n")
io.stderr\write("Unable to connect to the Internet.\n")