Skip to content
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

MX linux support #4770

Merged
merged 5 commits into from
May 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ Behavior changes:

Other enhancements:

* Support MX Linux in get-stack.sh. Fixes
[#4769](https://github.com/commercialhaskell/stack/issues/4769).
* Defer loading up of files for local packages. This allows us to get
plan construction errors much faster, and avoid some unnecessary
work when only building a subset of packages. This is especially
Expand Down
8 changes: 6 additions & 2 deletions etc/scripts/get-stack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ GETDISTRO
ubuntu|linuxmint|elementary|neon)
do_ubuntu_install "$VERSION"
;;
debian|kali|raspbian)
debian|kali|raspbian|mx)
do_debian_install "$VERSION"
;;
fedora)
Expand Down Expand Up @@ -609,7 +609,11 @@ try_install_pkgs() {

# Install packages using apt-get
apt_get_install_pkgs() {
if ! dpkg-query -W "$@"|grep -v '^\S\+\s\+.\+$' > /dev/null; then
# Grepping the output of dpkg-query and checking the overall status of the pipeline
# causes differing behaviors across various shell versions. So it is more portable to
# just check the staus of dpkg-query.
# See https://github.com/commercialhaskell/stack/pull/4770#pullrequestreview-229732166
if dpkg-query -W "$@" > /dev/null 2>&1; then
info "Already installed!"
elif ! sudocmd "install required system dependencies" apt-get install -y ${QUIET:+-qq} "$@"; then
die "Installing apt packages failed. Please run 'apt-get update' and try again."
Expand Down