Fix script execution
There is a bug which produces build errors when you try to use multiline statements inside the script. An example is a function definition:
Test()
{
# Do Things
}
This is because due to adding an echo for each line into the script itself, while using the -v
flag does the same but without said issue.
There is also an alternative flag -x
which does almost the same thing, it's expanding and putting a +
before the line, so if one wants to see what exactly is happening then using -vx
would be a better idea tough, but I think that should be rather a checkable option in the project settings then to make it a default thing.
One might need to add a "truncate first 2 lines" change to gitlab-ci to hide the shebang and trap lines from the output, but that's not really that important imo.
Note: The change should work, it did on my server at least...