Skip to content

Commit 6624b64

Browse files
author
Damian Rouson
committed
add skeletal installer
1 parent 70b25be commit 6624b64

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

install.sh

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,30 @@
33
set -u # error on use of undefined variable
44
set -e # exit on error
55

6-
# Install Haskell Stack to /usr/local/bin/stack
76
if command -v stack &> /dev/null ; then
87
echo "found stack"
98
else
9+
echo "Haskell stack not found."
10+
echo "Installing Haskell stack to."
1011
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
1118
fi
1219

20+
install_path="$HOME/.local/bin"
21+
if [[ -x "$install_path/fpm" ]]; then
22+
echo "Overwriting existing fpm installation in $install_path"
23+
fi
1324

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
2427

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

0 commit comments

Comments
 (0)