-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathdeploy_pre_commit.sh
More file actions
executable file
·41 lines (31 loc) · 960 Bytes
/
deploy_pre_commit.sh
File metadata and controls
executable file
·41 lines (31 loc) · 960 Bytes
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
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
if [[ ! -z "${MILK_ROOT}" ]]; then
echo "Changing dir to ${MILK_ROOT}"
cd ${MILK_ROOT}
fi
pip install pre-commit
sudo apt install shellcheck astyle
pre-commit install
for FOLD in $(ls -d ${MILK_ROOT}/plugins/milk-extra-src/*/); do
echo "Installing pre-commit in ${FOLD}"
cp ${MILK_ROOT}/.style.yapf ${FOLD}/
cp ${MILK_ROOT}/.pre-commit-config.yaml ${FOLD}/
cd ${FOLD}
pre-commit install
cd ${MILK_ROOT}
done
FOLD=${MILK_ROOT}/plugins/cacao-src/
echo "Installing pre-commit in ${FOLD}"
cp ${MILK_ROOT}/.style.yapf ${FOLD}/
cp ${MILK_ROOT}/.pre-commit-config.yaml ${FOLD}/
cd ${FOLD}
pre-commit install
cd ${MILK_ROOT}
FOLD=${MILK_ROOT}/plugins/coffee-src/
echo "Installing pre-commit in ${FOLD}"
cp ${MILK_ROOT}/.style.yapf ${FOLD}/
cp ${MILK_ROOT}/.pre-commit-config.yaml ${FOLD}/
cd ${FOLD}
pre-commit install
cd ${MILK_ROOT}
echo "Now you may run \"pre-commit run --all-files\" here and in plugin repos"