build: setup pre-commit in deploy_linux.sh

This commit is contained in:
Mike Salvatore 2021-04-05 13:32:13 -04:00
parent c1d4c7a0d2
commit 575b214c8e
1 changed files with 9 additions and 0 deletions

View File

@ -23,6 +23,13 @@ log_message() {
echo -e "DEPLOYMENT SCRIPT: $1"
}
configure_precommit() {
$1 -m pip install --user pre-commit
pushd "$2"
$HOME/.local/bin/pre-commit install
popd
}
if is_root; then
log_message "Please don't run this script as root"
exit 1
@ -225,5 +232,7 @@ fi
sudo chmod +x "${INFECTION_MONKEY_DIR}/build_linux.sh"
configure_precommit ${python_cmd} ${monkey_home}
log_message "Deployment script finished."
exit 0