-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.sh
executable file
·53 lines (43 loc) · 1.06 KB
/
bootstrap.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
set_up_homebrew() {
echo -e "\n[Homebrew]"
which -s brew
if (( $? != 0 )); then
echo "Installing Homebrew.."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
else
echo "Updating Homebrew.."
brew update
fi
}
set_up_python3() {
echo -e "\n[Python3]"
py_version=$(cat ".python-version")
pyenv --version
which -s pyenv
pyenv install $py_version
pyenv global $py_version
pyenv version
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.zshrc
source ~/.zshrc
}
check_versions() {
echo -e "\n[Versions]"
which python
python --version
pip --version
}
set_up_pipenv() {
echo -e "\n[PipEnv]"
pip install --upgrade pip
pip install -r requirements.txt
pipenv install
}
set_up_homebrew
brew bundle install
set_up_python3
check_versions
set_up_pipenv
# Start Env: pipenv shell
# VSCode: set Python Interpreter to ~/.local/share/virtualenvs/..
# Stop Env: exit