diff options
author | Marius <mariausol@gmail.com> | 2013-10-20 01:20:14 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2013-10-20 01:20:14 +0300 |
commit | 965214d981e6129b782c67adcaf3a81aedcb0bac (patch) | |
tree | 84f5945aae8efc9b6eb1898b873be5453cafe43d /scripts/context/lua/mtx-update.lua | |
parent | e7d0d90a434e5452ff9e86c8abab5a4cac35e2f1 (diff) | |
download | context-965214d981e6129b782c67adcaf3a81aedcb0bac.tar.gz |
stable 2013.05.28 00:36
Diffstat (limited to 'scripts/context/lua/mtx-update.lua')
-rw-r--r-- | scripts/context/lua/mtx-update.lua | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/scripts/context/lua/mtx-update.lua b/scripts/context/lua/mtx-update.lua index 25a5ac527..64203d3e3 100644 --- a/scripts/context/lua/mtx-update.lua +++ b/scripts/context/lua/mtx-update.lua @@ -162,9 +162,6 @@ scripts.update.platforms = { ["windows"] = "mswin", ["win32"] = "mswin", ["win"] = "mswin", - ["mswin-64"] = "mswin-64", - ["windows-64"] = "mswin-64", - ["win64"] = "mswin-64", ["linux"] = "linux", ["freebsd"] = "freebsd", ["freebsd-amd64"] = "freebsd-amd64", @@ -253,7 +250,7 @@ function scripts.update.synchronize() bin = gsub(bin,"\\","/") - if not find(url,"::$") then url = url .. "::" end + if not url:find("::$") then url = url .. "::" end local ok = lfs.attributes(texroot,"mode") == "directory" if not ok and force then dir.mkdirs(texroot) @@ -314,10 +311,10 @@ function scripts.update.synchronize() os.execute(command) -- read output of rsync local data = io.loaddata(temp_file) or "" - -- for every line extract the filename : drwxr-sr-x 18 2013/10/06 06:16:10 libertine - for chmod, s in gmatch(data,"([d%-][rwxst%-]+).-(%S+)[\n\r]") do + -- for every line extract the filename + for chmod, s in data:gmatch("([d%-][rwx%-]+).-(%S+)[\n\r]") do -- skip "current" folder - if s ~= '.' and #chmod >= 10 then + if s ~= '.' and chmod:len() == 10 then folders[#folders+1] = s end end @@ -433,7 +430,7 @@ function scripts.update.synchronize() if not environment.argument("force") then dryrunflags = "--dry-run" end - if (find(destination,"texmf$") or find(destination,"texmf%-context$") or find(destination,"texmf%-modules$")) and (not environment.argument("keep")) then + if (destination:find("texmf$") or destination:find("texmf%-context$") or destination:find("texmf%-modules$")) and (not environment.argument("keep")) then deleteflags = states.get("rsync.flags.delete") end command = format("%s %s %s %s %s'%s' '%s'", bin, normalflags, deleteflags, dryrunflags, url, archives, destination) |