-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpipi
executable file
·31 lines (26 loc) · 846 Bytes
/
pipi
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
#!/bin/bash -ue
# Pip installs any requirements files in the current directory.
usage() {
(
echo "usage: ${0##*/} [options]"
echo "Pip installs any requirements files in the current directory."
echo
echo "options:"
(
echo " -h, --help@ show usage help"
) | column -ts@
) 1>&2
exit 1
}
if echo "$*" | grep -Eq -- '--help\b|-h\b'; then
usage
fi
# shellcheck source=../.shell_control
# shellcheck disable=SC1091
source "$HOME/.shell_control" || echo "$(tput bold)error: ~/.shell_control not installed!$(tput sgr0)" >&2
run "pip install --upgrade pip"
INSTALL_CMD="pip install -U"
for REQ_FILE in requirements.txt requirements-dev.txt requirements-ci.txt requirements-local.txt; do
test -f "$REQ_FILE" && INSTALL_CMD="$INSTALL_CMD -r $_"
done
run "$INSTALL_CMD"