-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpython-modules.sh
More file actions
executable file
·38 lines (31 loc) · 902 Bytes
/
Copy pathpython-modules.sh
File metadata and controls
executable file
·38 lines (31 loc) · 902 Bytes
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
#!/usr/bin/env bash
#
# Copyright (C) 2015-2024 Joelle Maslak
# All Rights Reserved - See License
#
doit() {
# Defensive umask
if [ "$(umask)" == '0000' ] ; then
umask 0002
fi
# Use pyenv if it's installed but we haven't re-logged in
if [ -d "$HOME/.pyenv" ] ; then
if ! command -v pyenv >/dev/null ; then
# pyenv not in path.
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
fi
fi
if command -v pip 2>/dev/null ; then # Installed
pip install --upgrade pip
pip install -r requirements.txt
else
echo ""
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "You should install Python3/Pip."
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo ""
fi
}
doit