diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2019-01-09 12:10:26 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2019-01-09 13:50:35 +0000 |
commit | e22bd77117577c610a8dae895a9429d18ec02a90 (patch) | |
tree | 39b839f191e9d08aae5c8a9bf5edec64216c99a2 | |
parent | 01c0fe13cddb81174cefcbf589fd406e144c1c1b (diff) | |
download | lua-aports-e22bd77117577c610a8dae895a9429d18ec02a90.tar.bz2 lua-aports-e22bd77117577c610a8dae895a9429d18ec02a90.tar.xz |
buildrepo: replace aportsdir with conf.aportsdir
-rwxr-xr-x | bin/buildrepo.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/buildrepo.lua b/bin/buildrepo.lua index 48820c2..43cf0ce 100755 --- a/bin/buildrepo.lua +++ b/bin/buildrepo.lua @@ -157,7 +157,7 @@ conf.opts = opts conf.arch = abuild.arch local homedir = os.getenv("HOME") -local aportsdir = opts.a or conf.aportsdir or ("%s/aports"):format(homedir) +conf.aportsdir = opts.a or conf.aportsdir or ("%s/aports"):format(homedir) conf.repodest = opts.d or conf.repodest or abuild.repodest or ("%s/packages"):format(homedir) conf.logdir = opts.l or conf.logdir @@ -167,14 +167,14 @@ end local stats = {} for _, repo in pairs(args) do - local db = require('aports.db').new(aportsdir, repo, conf.repodest) + local db = require('aports.db').new(conf.aportsdir, repo, conf.repodest) local pkgs = {} local unsorted = {} stats[repo] = {} local start_time = os.clock() if not db then - err("%s/%s: Failed to open apkbuilds", aportsdir, repo) + err("%s/%s: Failed to open apkbuilds", conf.aportsdir, repo) os.exit(1) end @@ -191,7 +191,7 @@ for _, repo in pairs(args) do stats[repo].total_aports = total_aports -- run prerepo hooks - plugins_prerepo(repo, aportsdir, conf.repodest, abuild.arch, stats[repo], opts) + plugins_prerepo(repo, conf.aportsdir, conf.repodest, abuild.arch, stats[repo], opts) -- find out what needs to be built for aport in db:each_need_build() do @@ -261,7 +261,7 @@ for _, repo in pairs(args) do stats[repo].time = os.clock() - start_time -- run portrepo hooks - plugins_postrepo(repo, aportsdir, conf.repodest, abuild.arch, stats[repo], opts) + plugins_postrepo(repo, conf.aportsdir, conf.repodest, abuild.arch, stats[repo], opts) end for repo, stat in pairs(stats) do |