Last active
July 29, 2022 21:57
-
-
Save joedmck/8417c1503a2d7d6cd0e37f087ad8db6c to your computer and use it in GitHub Desktop.
Bash script to install all requirements.txt files in a monorepo with multiple Python microservices (with separate requirements.txt files for Docker build reasons).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
cd $(dirname $0) | |
handle_requirements_file() { | |
echo -e "\n\033[0;36m == Found requirements.txt at $1. Installing. == \033[0m\n" | |
pip3 install -r $1 | |
} | |
export -f handle_requirements_file | |
find . -name "requirements.txt" -type f -exec bash -c 'handle_requirements_file "$0"' {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment