aboutsummaryrefslogtreecommitdiff
path: root/install.sh
diff options
context:
space:
mode:
authorDamian Rouson <damian@sourceryinstitute.org>2020-10-13 11:41:07 -0700
committerDamian Rouson <damian@sourceryinstitute.org>2020-10-27 11:54:59 -0700
commit6624b64631e3c56bd47b8d763b9ce7f9ef8ffa49 (patch)
tree776091fa30058a87982e2b24719efae952780b44 /install.sh
parent70b25be45ac318db445cffb2b91ecadc70ffeafa (diff)
downloadfpm-6624b64631e3c56bd47b8d763b9ce7f9ef8ffa49.tar.gz
fpm-6624b64631e3c56bd47b8d763b9ce7f9ef8ffa49.zip
add skeletal installer
Diffstat (limited to 'install.sh')
-rwxr-xr-xinstall.sh31
1 files changed, 19 insertions, 12 deletions
diff --git a/install.sh b/install.sh
index 62e6892..cef50fc 100755
--- a/install.sh
+++ b/install.sh
@@ -3,23 +3,30 @@
set -u # error on use of undefined variable
set -e # exit on error
-# Install Haskell Stack to /usr/local/bin/stack
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
-# Check for Stack in /usr/local/bin/stack
-
-# On macOS, it might be necessary to run 'xcode-select --install' and/or
-# 'open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg'
-# to set up the Xcode command-line tools, which Stack uses.
-
-# Add '${USER}/.local/bin' the beginning of PATH in the fpm-setup.sh
-
-#cd boostrap
-#stack install
+cd bootstrap
+stack install
-# Check for fpm in ${USER}/.local/bin
+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