Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1775 tbg config newline check #1777

Conversation

theZiz
Copy link
Member

@theZiz theZiz commented Jan 20, 2017

This PR fixes the check for end lines allowing windows new lines (Issue #1775)
Furthermore as tbg does only support unix new lines, the config files are check for this trait.

@ax3l ax3l self-requested a review January 23, 2017 15:01
@ax3l ax3l added bug a bug in the project's code component: tools scripts, python libs and CMake labels Jan 23, 2017
@ax3l ax3l added this to the Next Stable: 0.3.0 / 1.0.0 milestone Jan 23, 2017
@@ -374,12 +374,29 @@ if [ ! -f "$cfg_file" ] ; then
fi

# cfg file sanity check - space after \ at EOL ?
cfg_err=`egrep "\\\\\[[:space:]]+$" $cfg_file | wc -l`
cfg_err=`egrep "\\\\\[[:blank:]]+$" $cfg_file | wc -l`
if [ $cfg_err != 0 ] ; then
echo "ERROR: file \"$cfg_file\" contains spaces after line continuation \\"
echo "Check the following lines for end-of-line spaces:"
echo ""
egrep -n "\\\[[:space:]]+$" $cfg_file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:space: should be :blank:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason it is once 5x and an other time 3x \? Afaik, -n does not change the syntax of egrep, does it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed it: 4043dce

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea, I am just the pattern matching boy. I see stuff and replace it with other stuff. I am not paid to think about the stuff! 😜

@ax3l ax3l changed the title Fixing issue #1775 + tbg config new line check Fix #1775 + tbg config new line check Jan 24, 2017
@ax3l ax3l changed the title Fix #1775 + tbg config new line check Fix #1775 tbg config new line check Jan 24, 2017
@ax3l ax3l changed the title Fix #1775 tbg config new line check Fix #1775 tbg config newline check Jan 24, 2017
@psychocoderHPC psychocoderHPC merged commit d277fc6 into ComputationalRadiationPhysics:dev Jan 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug a bug in the project's code component: tools scripts, python libs and CMake
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants