blob: cef50fc1782c1ce34c5a49e16879216640af9326 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#!/bin/sh
set -u # error on use of undefined variable
set -e # exit on error
if command -v stack &> /dev/null ; then
echo "found stack"
else
echo "Haskell stack not found."
echo "Installing Haskell stack to."
curl -sSL https://get.haskellstack.org/ | sh
if [[ -x "$install_path/stack" ]]; then
echo "Haskell stack installation successful."
else
echo "Haskell stack installation unsuccessful."
exit 1
fi
fi
install_path="$HOME/.local/bin"
if [[ -x "$install_path/fpm" ]]; then
echo "Overwriting existing fpm installation in $install_path"
fi
cd bootstrap
stack install
if [[ -x "$install_path/fpm" ]]; then
echo "fpm installed successfully to $install_path"
else
echo "fpm installation unsuccessful: fpm not found in $install_path"
fi
|