Skip to content

Commit

Permalink
Merge pull request #1450 from rpspringuel/simple_filename
Browse files Browse the repository at this point in the history
Simpler fix for filenames
  • Loading branch information
rpspringuel authored Apr 6, 2019
2 parents af87e1a + 9f58425 commit 695bc19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ As of v3.0.0 this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased][CTAN]
### Fixed
- Project names with quotes in them no longer cause GregorioTeX to not be able to find the executable. See [#1416](https://github.com/gregorio-project/gregorio/issues/1416).
- Eliminated implicit casting from float to integer in string formatting (something no longer allowed in Lua 5.3)


## [5.2.0] - 2019-03-10
### Fixed
- `latin` is now supported as a valid language name. This brings Latin into line with other languages where both titlecased and lowercased version of the language name (e.g. `English` and `english`) are both allowed.
Expand Down
6 changes: 3 additions & 3 deletions tex/gregoriotex.lua
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,13 @@ local function gregorio_exe()

-- first look for one with the exact version
real_gregorio_exe = 'gregorio-5_2_0' -- FILENAME_VERSION
local cmd = string.format("%s -o %%s %s", real_gregorio_exe,
local cmd = string.format([[%s -o "%%s" "%s"]], real_gregorio_exe,
test_snippet_filename)
exe_version = get_prog_output(cmd, '*line')
if not exe_version then
-- look for suffix-less executable
real_gregorio_exe = 'gregorio'
cmd = string.format("%s -o %%s %s", real_gregorio_exe,
cmd = string.format([[%s -o "%%s" "%s"]], real_gregorio_exe,
test_snippet_filename)
exe_version = get_prog_output(cmd, '*line')
end
Expand Down Expand Up @@ -932,7 +932,7 @@ local function direct_gabc(gabc, header, allow_deprecated)
gabc = gabc:match('^()%s*$') and '' or gabc:match('^%s*(.*%S)')
f:write('name:direct-gabc;\n'..(header or '')..'\n%%\n'..gabc:gsub('\\par ', '\n'))
f:close()
local cmd = string.format('%s -W %s-o %%s -l %s %s', gregorio_exe(),
local cmd = string.format([[%s -W %s-o "%%s" -l "%s" "%s"]], gregorio_exe(),
deprecated, snippet_logname, snippet_filename)
local content = get_prog_output(cmd, '*a')
if content == nil then
Expand Down

0 comments on commit 695bc19

Please sign in to comment.