legendary-doc-site/script/bootstrap

31 lines
706 B
Text
Raw Normal View History

#!/bin/bash
2020-07-02 21:08:53 +00:00
set -x
set -e
if ! brew -v &> /dev/null
then
echo "WARNING: Cannot find brew. Skipping brewfile installation."
export KERL_CONFIGURE_OPTIONS="$KERL_CONFIGURE_OPTIONS --disable-hipe"
2020-07-02 21:08:53 +00:00
else
brew bundle
export KERL_CONFIGURE_OPTIONS="$KERL_CONFIGURE_OPTIONS --disable-hipe --with-ssl=$(brew --prefix openssl)"
2020-07-02 21:08:53 +00:00
fi
if ! which asdf &> /dev/null
then
echo "WARNING: No asdf. Skipping erlang, elixir, node installation."
else
export CFLAGS="-O2 -g -fno-stack-check"
2020-07-02 21:08:53 +00:00
asdf plugin-add elixir || true
asdf plugin-add erlang || true
asdf plugin-add nodejs || true
2020-07-02 21:08:53 +00:00
${ASDF_DATA_DIR:=$HOME/.asdf}/plugins/nodejs/bin/import-release-team-keyring
2020-07-02 21:08:53 +00:00
asdf install
fi
2020-07-02 21:08:53 +00:00
mix local.hex --force