From eda85468812b28e8db06c77aacc6e15652c86d01 Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Tue, 19 Nov 2013 20:01:36 +0100 Subject: [PATCH] Adjust to get_tool_flags() change, convert back to string where required Signed-off-by: Tobias Ulmer --- generic/e2lib.lua | 2 ++ generic/e2option.lua | 5 ++++- generic/transport.lua | 2 ++ local/e2-help.lua | 4 ++-- plugins/git.lua | 3 +++ 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/generic/e2lib.lua b/generic/e2lib.lua index acd7e0a..ac46c27 100644 --- a/generic/e2lib.lua +++ b/generic/e2lib.lua @@ -2206,6 +2206,8 @@ function e2lib.sha1sum(path) return false, e:cat(re) end + sha1sum_flags = table.concat(sha1sum_flags, " ") + cmd = string.format("%s %s %s", e2lib.shquote(sha1sum), sha1sum_flags, e2lib.shquote(path)) diff --git a/generic/e2option.lua b/generic/e2option.lua index 628c080..2b1f08e 100644 --- a/generic/e2option.lua +++ b/generic/e2option.lua @@ -464,7 +464,10 @@ function e2option.showtoolmanpage() viewerflags = tools.get_tool_flags(s) if viewer then table.insert(cmd, e2lib.shquote(viewer)) - if viewerflags and viewerflags ~= "" then + if viewerflags then + viewerflags = table.concat(viewerflags, " ") + end + if viewerflags ~= "" then table.insert(cmd, viewerflags) end diff --git a/generic/transport.lua b/generic/transport.lua index 969db7a..c3d024a 100644 --- a/generic/transport.lua +++ b/generic/transport.lua @@ -70,6 +70,8 @@ local function rsync_ssh(opts, src, dest) return false, re end + rshflags = table.concat(rshflags, " ") + if rshflags ~= "" then rsh = string.format("%s %s", rsh, rshflags) end diff --git a/local/e2-help.lua b/local/e2-help.lua index da78a70..8d2237d 100644 --- a/local/e2-help.lua +++ b/local/e2-help.lua @@ -179,8 +179,8 @@ local function display_man_page(doc) table.insert(cmd, e2lib.shquote(viewer)) local viewerflags = tools.get_tool_flags("man") - if viewerflags and viewerflags ~= "" then - table.insert(cmd, viewerflags) + if viewerflags and #viewerflags > 0 then + table.insert(cmd, table.concat(viewerflags, " ")) end table.insert(cmd, e2lib.shquote(e2lib.join(doc.path, doc.filename))) diff --git a/plugins/git.lua b/plugins/git.lua index 1ef414c..0c5cfb6 100644 --- a/plugins/git.lua +++ b/plugins/git.lua @@ -385,6 +385,9 @@ function git.prepare_source(info, sourcename, sourceset, buildpath) if not tarflags then return false, e:cat(re) end + + tarflags = table.concat(tarflags, " ") + local cmd1 = string.format("%s %s -c -C %s/%s --exclude '.git' .", e2lib.shquote(tar), tarflags, e2lib.shquote(info.root), e2lib.shquote(src.working)) -- 2.39.5