-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix scripts #3667
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 scripts #3667
Conversation
|
Great! Travis CI build is now passing. |
cmake/msys/msys_helper.sh
Outdated
| mv "$mingw_root/lib/bin/libgig-7.dll" "$mingw_root/bin" | ||
|
|
||
| if [ $? -ne 0 ]; then | ||
| if ! mv "$mingw_root/lib/bin/libgig-7.dll" "$mingw_root/bin"; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is where shellcheck shows its value. If we need both DLLs, we'll need to test for both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. This problem also existed before, and we need to fix it if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ! ( mv "$mingw_root/lib/bin/libakai-0.dll" "$mingw_root/bin" && mv "$mingw_root/lib/bin/libgig-7.dll" "$mingw_root/bin" );then@tresf Would it be better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PhysSong I'm not sure. I have some reservations about how the script is growing in general (could benefit from some utility functions). I guess it's OK. I'm curious what @zapashcanon comes up with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's something I don't understand. Why don't we (I) add set -e on the previous PR on this script ? That would allow us to remove almost all these tests...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zapashcanon I think so.
If you add set -e, however, printing custom error message will be unable. Is there alternative method? Or, is it okay to disable printing custom error message?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure... we're moving toset -e for everything else. 👍. We've sort of repurposed a fetch/untar script as a build helper so this file is growing in complexity which can affect how it should respond to errors.
Ideally we'd just move away from this technique and leverage something crowdsourced like scoop instead, but we're not there yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved to set -e in a new commit. There's no need for custom error message IMO: we print a lot of info about what we're doing, so the user will know what failed, plus, the shell will print something too. What do you think ?
|
@tresf I suggest you to merge ASAP if there's no problem. Some people might think Travis CI is failing because of Critical bug(s). By merging this, We can prevent such misunderstandings. |
|
The message to relaunch in mingw shell is there for a reasons since this can be unobvious to the user. Please bring it back as well as red error message. |
Are you just talking about the relauch in mingw shell or every error message ? I think most of the error message are useless, e.g.: info "Downloading and building fltk $fltkver"
if ! which fluid; then
wget http://fltk.org/pub/fltk/$fltkver/fltk-$fltkver-source.tar.gz -O "$HOME/fltk-source.tar.gz"If If you disagree, so, what you want is just my first commit right ? I can just remove the second commit... But I think we should keep it. |
Agreed, just the mingw one, it's not obvious at all, but to that point we may have others that aren't obvious down the road. |
We probably could do something with
I'll fix it in the second commit then. |
|
@zapashcanon @tresf Now it seems to be ready for merge. Is it needs any more changes? |
|
Were the indents addressed? I understand there is a need for master to clear Travis-CI, but "ready for merge" is subjective. |
cmake/msys/msys_helper.sh
Outdated
| if [ $? -ne 0 ]; then | ||
| err "ERROR: Could not build/install libgig -- gigplayer needs this. Exiting." | ||
| fi | ||
| mv "$mingw_root/lib/bin/libgig-7.dll" "$mingw_root/bin" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs indentation?
.travis/script.sh
Outdated
|
|
||
| # SC2185 is disabled because of: https://github.com/koalaman/shellcheck/issues/942 | ||
| # once it's fixed, it should be enabled again | ||
| # shellcheck disable=SC2185 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here three lines, too.
|
@tresf, I didn't noticed the indent, fixed now. |
|
Thanks for the fixes! Merging. If we encounter new issues we'll submit them as new PRs/patches. |
|
@zapashcanon the merge button gave credit to me do to the way the commits were added (my attempt to Jeep then separate). Apologies. |
|
|
@tresf No. He's credited. This was in master and our default is stable-1.2 so once we switch to master these commits will be visible. If I'm even on topic here... |
Thanks.
I agree on this. |
Fix scripts for shellcheck
Hi,
See this comment.