Skip to content

Commit 126c1e0

Browse files
authored
Update okrutnik.sh
1 parent a809b4c commit 126c1e0

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

okrutnik.sh

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# --------------------------------------------
2222

2323
# Version
24-
VERSION=2.1.0
24+
VERSION=2.1.2
2525

2626
# Toolset
2727
TOOLSET="bandit black codespell mypy pylint pyright pylama ruff safety"
@@ -35,6 +35,7 @@ VENV="${BASEDIR}/.okrutnik_venv"
3535
# Args
3636
ARG1=$1
3737
ARG2=$2
38+
ARG3=$3
3839

3940
# Colors
4041
ORANGE='\e[1;33m'
@@ -81,6 +82,10 @@ okrutnik_install() {
8182
okrutnik_which_pip
8283
${PIP} install --upgrade pip setuptools wheel
8384
${PIP} install --upgrade ${TOOLSET}
85+
if [[ "$ARG2" == "-r" ]] && [[ -e $ARG3 ]]; then
86+
print "$ARG3"
87+
${PIP} install -r $ARG3
88+
fi
8489
echo -e "${CYAN}Receiving communication...${ENDCOLOR}"
8590
echo -e "-> ${GREEN}All your base are belong to us${ENDCOLOR} 👽"
8691
}
@@ -133,13 +138,14 @@ if [[ "$ARG1" == "-h" ]] || [[ "$ARG1" == "--help" ]]; then
133138
echo "Usage: ./okrutnik.sh [options] <target>"
134139
echo ""
135140
echo "Before <target>:"
136-
echo " -s, --stop Exit on failed linters or errors"
141+
echo " -s, --stop Exit on failed linters or errors"
137142
echo ""
138143
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"
143149
exit 0
144150
elif [[ "$ARG1" == "--update" ]]; then
145151
okrutnik_install

0 commit comments

Comments
 (0)