Improve install_eb_dep.sh#3314
Merged
akesandgren merged 1 commit intoeasybuilders:developfrom May 4, 2020
Merged
Conversation
- Use correct paths (stray $HOME instead of $PREFIX) - Use bash parameter expansion instead of `echo | sed` - Correct quoting - Cleanup archive and folder - Reset -e
f7dcead to
9fe985a
Compare
akesandgren
previously requested changes
May 2, 2020
| PRECONFIG_CMD= | ||
|
|
||
| if [ x$PKG_NAME == 'xmodules' ] && [ x$PKG_VERSION == 'x3.2.10' ]; then | ||
| if [ "$PKG_NAME" == 'modules' ] && [ "$PKG_VERSION" == '3.2.10' ]; then |
Contributor
There was a problem hiding this comment.
Use = and not == for POSIX comformance in all if [ statements comparing strings
Contributor
Author
There was a problem hiding this comment.
The script has a bash shebang and AFAIK == is bash and worked before. Don't really want to change something like that unless you see value in doing so
| mkdir -p "${PREFIX}" | ||
| if ! wget "${PKG_URL}" && [ -n "$BACKUP_PKG_URL" ]; then | ||
| rm -f ./*"${PKG_VERSION}".tar.gz | ||
| wget "${BACKUP_PKG_URL}" |
Contributor
There was a problem hiding this comment.
If this fails, should probably bail out. Same for other wget's below
Contributor
Author
There was a problem hiding this comment.
The script has set -e which bails out on any error already
| if [[ ! -z $PRECONFIG_CMD ]]; then | ||
| eval ${PRECONFIG_CMD} | ||
| cd "${PKG}" | ||
| if [[ -n "$PRECONFIG_CMD" ]]; then |
Contributor
Author
There was a problem hiding this comment.
Was there before, didn't change that. Just changed the "not not" to "is" semantic
Contributor
|
Going in, thanks @Flamefire! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
echo | sedThis script helped me a lot for #3216, so here some improvements for local use.