summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-10-08 00:40:20 +0300
committerMarius <mariausol@gmail.com>2013-10-08 00:40:20 +0300
commitc8d84e5a3b559ca1e7df5f6348d4875a26dbfa47 (patch)
tree9460ad9e3d5c9707487ecb6c46009515344ad137 /scripts
parentdf96ce30a9d14d115fef77a6abe1a5e852906f88 (diff)
downloadcontext-c8d84e5a3b559ca1e7df5f6348d4875a26dbfa47.tar.gz
beta 2013.10.07 23:31
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/lua/mtx-update.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/context/lua/mtx-update.lua b/scripts/context/lua/mtx-update.lua
index a26be483c..25a5ac527 100644
--- a/scripts/context/lua/mtx-update.lua
+++ b/scripts/context/lua/mtx-update.lua
@@ -253,7 +253,7 @@ function scripts.update.synchronize()
bin = gsub(bin,"\\","/")
- if not url:find("::$") then url = url .. "::" end
+ if not find(url,"::$") then url = url .. "::" end
local ok = lfs.attributes(texroot,"mode") == "directory"
if not ok and force then
dir.mkdirs(texroot)
@@ -314,10 +314,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
- for chmod, s in data:gmatch("([d%-][rwx%-]+).-(%S+)[\n\r]") do
+ -- 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
-- skip "current" folder
- if s ~= '.' and chmod:len() == 10 then
+ if s ~= '.' and #chmod >= 10 then
folders[#folders+1] = s
end
end
@@ -433,7 +433,7 @@ function scripts.update.synchronize()
if not environment.argument("force") then
dryrunflags = "--dry-run"
end
- if (destination:find("texmf$") or destination:find("texmf%-context$") or destination:find("texmf%-modules$")) and (not environment.argument("keep")) then
+ if (find(destination,"texmf$") or find(destination,"texmf%-context$") or find(destination,"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)