-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ilan
committed
Mar 28, 2023
1 parent
d03cefc
commit 87a1e53
Showing
7 changed files
with
773 additions
and
614 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# workaround to support M1 and Linux | ||
export PATH=/opt/homebrew/bin:/home/linuxbrew/.linuxbrew/bin:"$PATH" | ||
|
||
dependencies=$1 | ||
|
||
# if empty dependencies | ||
|
@@ -12,27 +9,9 @@ if [ -z "$dependencies" ]; then | |
exit 0 | ||
fi | ||
|
||
# check if brew installed | ||
if ! [ -x "$(command -v brew)" ]; then | ||
echo "Please install Homebrew first to install dependencies. Homebrew installation command:" | ||
echo '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"' | ||
exit 1 | ||
fi | ||
brew update | ||
# check if "docker" in dependencies | ||
if [[ $dependencies == *"docker"* ]]; then | ||
brew install --cask docker || echo "Install Docker manually" | ||
fi | ||
|
||
if [[ $dependencies == *"python"* ]]; then | ||
brew install [email protected] || echo "Install python manually" | ||
fi | ||
|
||
|
||
brew install $dependencies || true | ||
|
||
if [[ $dependencies == *"pyenv"* ]]; then | ||
# If pyenv not already exists in zshrc, add it | ||
curl https://pyenv.run | bash || true | ||
export PYENV_ROOT="$HOME/.pyenv"; | ||
export PATH="$PYENV_ROOT/bin":$PATH; | ||
eval "$(pyenv init -)" | ||
|
@@ -43,8 +22,9 @@ if [[ $dependencies == *"pyenv"* ]]; then | |
pyenv install 2.7.18 --force | ||
pyenv global $LATEST_PYTHON 2.7.18; | ||
fi | ||
# check if python is availible | ||
if ! [ -x "$(command -v python)" ]; then | ||
echo "Python is not availible. setting poetry to python3" | ||
poetry env use python3 || poetry env use /home/linuxbrew/.linuxbrew/bin/python3 || true | ||
fi | ||
|
||
if [[ $dependencies == *"poetry" ]] | ||
then | ||
echo "Installing poetry" | ||
curl -sSL https://install.python-poetry.org | python3 - | ||
fi |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.