close
Skip to content

Support jessie/xenial in install scripts.#255

Merged
mysociety-pusher merged 1 commit into
masterfrom
jessie-support
Aug 22, 2016
Merged

Support jessie/xenial in install scripts.#255
mysociety-pusher merged 1 commit into
masterfrom
jessie-support

Conversation

@dracos
Copy link
Copy Markdown
Member

@dracos dracos commented Aug 19, 2016

The script hardcoded a check for trusty as a proxy for PostGIS 2.
Instead, look up the postgis package version installed and use that.

Comment thread bin/install-as-user Outdated
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)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is neat :) However I'd probably either:

  • Add a comment to explain that POSTGIS_TWO will be '2.0' if the PostGIS version is >= 2.0, and the actual version otherwise.
  • Or set POSTGIS_TWO to Yes or No, 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

@mhl
Copy link
Copy Markdown
Contributor

mhl commented Aug 22, 2016

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.
@dracos
Copy link
Copy Markdown
Member Author

dracos commented Aug 22, 2016

Discovered this was running somewhere where -e didn't work, switched to printf.

@dracos dracos deleted the jessie-support branch September 30, 2016 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants