[latex3-commits] [git/LaTeX3-latex3-l3build] master: fix upload in windows (f8c8547)
Will Robertson
wspr81 at gmail.com
Mon Jan 7 15:21:47 CET 2019
Repository : https://github.com/latex3/l3build
On branch : master
Link : https://github.com/latex3/l3build/commit/f8c8547990fb20b8cd077bccb09de63a70be3b4f
>---------------------------------------------------------------
commit f8c8547990fb20b8cd077bccb09de63a70be3b4f
Author: Will Robertson <wspr81 at gmail.com>
Date: Mon Jan 7 22:21:47 2019 +0800
fix upload in windows
i hope!
>---------------------------------------------------------------
f8c8547990fb20b8cd077bccb09de63a70be3b4f
l3build-upload.lua | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/l3build-upload.lua b/l3build-upload.lua
index b54bac6..a428dd6 100644
--- a/l3build-upload.lua
+++ b/l3build-upload.lua
@@ -33,6 +33,8 @@ local popen = io.popen
local read = io.read
local write = io.write
+local os_type = os.type
+
local len = string.len
local lower = string.lower
local match = string.match
@@ -210,8 +212,12 @@ function construct_ctan_post(uploadfile)
ctan_field("version", uploadconfig.version, 32, "Package version", true, false )
-- finish constructing the curl command:
- ctan_post = ctan_post .. ' --form "file=@' .. tostring(uploadfile) .. ';filename=' .. tostring(uploadfile) .. '"'
- ctan_post = ctan_post .. " https://ctan.org/submit/"
+ local qq = '"'
+ if os_type == "windows" then
+ qq = '\"'
+ end
+ ctan_post = ctan_post .. ' --form ' .. qq .. 'file=@' .. tostring(uploadfile) .. ';filename=' .. tostring(uploadfile) .. qq
+ ctan_post = ctan_post .. ' https://ctan.org/submit/'
return ctan_post
More information about the latex3-commits
mailing list