Support jessie/xenial in install scripts.#255
Merged
Conversation
| then | ||
| if [ trusty = "$(lsb_release -s -c)" ] | ||
| VERSION_POSTGIS=$(dpkg-query -W -f '${Version}\n' postgresql-*-postgis*|sort -rV|head -1) | ||
| POSTGIS_TWO=$(echo -e '2.0\n'$VERSION_POSTGIS | sort -V | head -1) |
Contributor
There was a problem hiding this comment.
This is neat :) However I'd probably either:
- Add a comment to explain that
POSTGIS_TWOwill be '2.0' if the PostGIS version is >= 2.0, and the actual version otherwise. - Or set
POSTGIS_TWOtoYesorNo, e.g. with:
if [ 2.0 = "$(echo -e '2.0\n'$VERSION_POSTGIS | sort -V | head -1)" ]
then POSTGIS_TWO=Yes
else POSTGIS_TWO=No
fi
Contributor
|
A small optional comment, otherwise looks good 👍 |
The script hardcoded a check for trusty as a proxy for PostGIS 2. Instead, look up the postgis package version installed and use that.
cb55c8d to
21b8547
Compare
Member
Author
|
Discovered this was running somewhere where |
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.
The script hardcoded a check for trusty as a proxy for PostGIS 2.
Instead, look up the postgis package version installed and use that.