Skip to content

Commit

Permalink
TranslateDesktop: Use -a switch in grep commands
Browse files Browse the repository at this point in the history
As of grep v2.23 some translation files are considered as binary (maybe because of some locale settings)
and then the created .desktop file is malformed. So we force the grep to handle all provided input
files as text.

closes lxqt/lxqt#957
  • Loading branch information
palinek committed Feb 12, 2016
1 parent 83c93de commit 082321a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmake/modules/LXQtTranslateDesktop.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ function(lxqt_translate_desktop _RESULT)
if (_translations)
list(SORT _translations)
add_custom_command(OUTPUT ${_outFile}
COMMAND grep -v "'#TRANSLATIONS_DIR='" ${_inFile} > ${_outFile}
COMMAND grep -h ${_pattern} ${_translations} >> ${_outFile}
COMMAND grep -v -a "'#TRANSLATIONS_DIR='" ${_inFile} > ${_outFile}
COMMAND grep -h -a ${_pattern} ${_translations} >> ${_outFile}
COMMENT "Generating ${_fileName}${_fileExt}"
)
else()
add_custom_command(OUTPUT ${_outFile}
COMMAND grep -v "'#TRANSLATIONS_DIR='" ${_inFile} > ${_outFile}
COMMAND grep -v -a "'#TRANSLATIONS_DIR='" ${_inFile} > ${_outFile}
COMMENT "Generating ${_fileName}${_fileExt}"
)
endif()
Expand Down

0 comments on commit 082321a

Please sign in to comment.