File tree Expand file tree Collapse file tree 1 file changed +19
-12
lines changed Expand file tree Collapse file tree 1 file changed +19
-12
lines changed Original file line number Diff line number Diff line change 3
3
set -u # error on use of undefined variable
4
4
set -e # exit on error
5
5
6
- # Install Haskell Stack to /usr/local/bin/stack
7
6
if command -v stack & > /dev/null ; then
8
7
echo " found stack"
9
8
else
9
+ echo " Haskell stack not found."
10
+ echo " Installing Haskell stack to."
10
11
curl -sSL https://get.haskellstack.org/ | sh
12
+ if [[ -x " $install_path /stack" ]]; then
13
+ echo " Haskell stack installation successful."
14
+ else
15
+ echo " Haskell stack installation unsuccessful."
16
+ exit 1
17
+ fi
11
18
fi
12
19
20
+ install_path=" $HOME /.local/bin"
21
+ if [[ -x " $install_path /fpm" ]]; then
22
+ echo " Overwriting existing fpm installation in $install_path "
23
+ fi
13
24
14
- # Check for Stack in /usr/local/bin/stack
15
-
16
- # On macOS, it might be necessary to run 'xcode-select --install' and/or
17
- # 'open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg'
18
- # to set up the Xcode command-line tools, which Stack uses.
19
-
20
- # Add '${USER}/.local/bin' the beginning of PATH in the fpm-setup.sh
21
-
22
- # cd boostrap
23
- # stack install
25
+ cd bootstrap
26
+ stack install
24
27
25
- # Check for fpm in ${USER}/.local/bin
28
+ if [[ -x " $install_path /fpm" ]]; then
29
+ echo " fpm installed successfully to $install_path "
30
+ else
31
+ echo " fpm installation unsuccessful: fpm not found in $install_path "
32
+ fi
You can’t perform that action at this time.
0 commit comments