diff options
author | Marius <mariausol@gmail.com> | 2011-07-14 13:40:13 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2011-07-14 13:40:13 +0300 |
commit | 06c7a7fdaac34512cdc3ff250dec5b1a7ab3052a (patch) | |
tree | aabadf8b346592b5c67f69c799c929b9c04720c5 /scripts | |
parent | 3dd416f677074c27a248e3433695a6fe8c13ef69 (diff) | |
download | context-06c7a7fdaac34512cdc3ff250dec5b1a7ab3052a.tar.gz |
beta 2011.07.14 12:19
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/context/lua/mtx-update.lua | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/scripts/context/lua/mtx-update.lua b/scripts/context/lua/mtx-update.lua index 099a7218f..937fed21b 100644 --- a/scripts/context/lua/mtx-update.lua +++ b/scripts/context/lua/mtx-update.lua @@ -542,18 +542,30 @@ if scripts.savestate then for r in gmatch(environment.argument("repository") or "current","([^, ]+)") do if valid[r] then states.set("repositories." .. r, true) end end + local valid = scripts.update.engines - for r in gmatch(environment.argument("engine") or "all","([^, ]+)") do - if r == "all" then - for k, v in next, valid do - if k ~= "all" then - states.set("engines." .. k, true) + local engine = environment.argument("engine") or "" + if engine == "" then + local e = states.get("engines") + if not e or not next(e) then + engine = "all" + end + end + if engine ~= "" then + for r in gmatch(engine,"([^, ]+)") do + if r == "all" then + for k, v in next, valid do + if k ~= "all" then + states.set("engines." .. k, true) + end end + break + elseif valid[r] then + states.set("engines." .. r, true) end - elseif valid[r] then - states.set("engines." .. r, true) end end + local valid = scripts.update.platforms for r in gmatch(environment.argument("platform") or os.platform,"([^, ]+)") do if valid[r] then states.set("platforms." .. r, true) end |