21
21
# --------------------------------------------
22
22
23
23
# Version
24
- VERSION=2.1.0
24
+ VERSION=2.1.2
25
25
26
26
# Toolset
27
27
TOOLSET=" bandit black codespell mypy pylint pyright pylama ruff safety"
@@ -35,6 +35,7 @@ VENV="${BASEDIR}/.okrutnik_venv"
35
35
# Args
36
36
ARG1=$1
37
37
ARG2=$2
38
+ ARG3=$3
38
39
39
40
# Colors
40
41
ORANGE=' \e[1;33m'
@@ -81,6 +82,10 @@ okrutnik_install() {
81
82
okrutnik_which_pip
82
83
${PIP} install --upgrade pip setuptools wheel
83
84
${PIP} install --upgrade ${TOOLSET}
85
+ if [[ " $ARG2 " == " -r" ]] && [[ -e $ARG3 ]]; then
86
+ print " $ARG3 "
87
+ ${PIP} install -r $ARG3
88
+ fi
84
89
echo -e " ${CYAN} Receiving communication...${ENDCOLOR} "
85
90
echo -e " -> ${GREEN} All your base are belong to us${ENDCOLOR} 👽"
86
91
}
@@ -133,13 +138,14 @@ if [[ "$ARG1" == "-h" ]] || [[ "$ARG1" == "--help" ]]; then
133
138
echo " Usage: ./okrutnik.sh [options] <target>"
134
139
echo " "
135
140
echo " Before <target>:"
136
- echo " -s, --stop Exit on failed linters or errors"
141
+ echo " -s, --stop Exit on failed linters or errors"
137
142
echo " "
138
143
echo " Standalone:"
139
- echo " -h, --help Print this help message"
140
- echo " --update Update installed tools"
141
- echo " --uninstall Remove installed tools"
142
- echo " --safety Run safety check"
144
+ echo " -h, --help Print this help message"
145
+ echo " --update Update installed tools"
146
+ echo " --install [-r requirements.txt] Install tools [and target requirements]"
147
+ echo " --uninstall Remove installed tools"
148
+ echo " --safety Run safety check"
143
149
exit 0
144
150
elif [[ " $ARG1 " == " --update" ]]; then
145
151
okrutnik_install
0 commit comments