## You can also install it like this, but my paranoia will not let me
## do that sort of thing without at least looking at the script first:
# curl -sSL https://get.haskellstack.org/ | sh
## or
# wget -qO- https://get.haskellstack.org/ | sh
# Create ~/.local/bin which is where it will put binaries
mkdir -p -m 0700 ~/.local/bin
# Get the 64-bit binary release tarball
cd
test -f installed/stack-2.7.1-linux-x86_64.tar.gz &&
mv -f installed/stack-2.7.1-linux-x86_64.tar.gz .
test ! -f stack-2.7.1-linux-x86_64.tar.gz &&
wget https://github.com/commercialhaskell/stack/releases/download/v2.7.1/\
stack-2.7.1-linux-x86_64.tar.gz
# Extract it
mkdir -p -m 0700 ~/src
cd ~/src
tar xzvf ~/stack-2.7.1-linux-x86_64.tar.gz
cd stack-2.7.1-linux-x86_64
test $UID = 0 && chown -R root:root .
# See documentation in ./doc/
# Convert those files to other formats with pandoc
# Become root to install it
su
# Install the stack binary in /usr/local/bin
install -s -m 755 -o 0 -g 0 stack /usr/local/bin/
# Update your PATH to include ~/.local/bin
echo '#!/bin/sh' > /etc/profile.d/stack.sh
echo 'test -d "$HOME/.local/bin" && PATH=$HOME/.local/bin:$PATH' >> \
/etc/profile.d/stack.sh
chmod 755 /etc/profile.d/stack.sh
# Save the binary tarball for later
cd
mkdir -p -m 0700 installed
rm -f installed/stack-*.linux-x86_64.tar.gz
mv -f stack-2.7.1-linux-x86_64.tar.gz installed/