@@ -31,6 +31,73 @@ tasks:
31
31
command : shell.exec
32
32
params :
33
33
script : |
34
+
35
+ . ${venv}/activate
36
+
37
+ python3 -m pip install -qqq --upgrade pip || true
38
+
39
+ ( cd "~"
40
+ rm -rf dev
41
+ mkdir dev
42
+ cd dev
43
+
44
+ git clone --depth=1 https://github.com/mongodb/mut.git
45
+
46
+ ( cd mut && python3 -m pip install -r requirements.txt . )
47
+ )
48
+
49
+ install_helper mut
50
+ install_helper mut-build
51
+ install_helper mut-convert-redirects
52
+ install_helper mut-images
53
+ install_helper mut-index
54
+ install_helper mut-intersphinx
55
+ install_helper mut-lint
56
+ install_helper mut-publish
57
+ install_helper mut-redirects
58
+
59
+ if ! echo "${PATH}" | grep -q "~/bin"; then
60
+ local rc_files=()
61
+ if [ -r ~/.bash_profile ]; then
62
+ rc_files+=(~/.bash_profile)
63
+ elif [ -r ~/.bashrc ]; then
64
+ rc_files+=(~/.bashrc)
65
+ fi
66
+
67
+ if [ -r ~/.zshenv ]; then
68
+ rc_files+=(~/.zshenv)
69
+ elif [ -r ~/.zshrc ]; then
70
+ rc_files+=(~/.zshrc)
71
+ fi
72
+
73
+ if [ ! -z "${rc_files[0]}" ] && ask 'Add PATH environment variable?'; then
74
+ for rc in "${rc_files[@]}"; do
75
+ printf "\nPATH=\$PATH:%s/bin\n" "~" >> "${rc}"
76
+ done
77
+
78
+ echo 'Open a new terminal to use the changes'
79
+ else
80
+ echo ''
81
+ echo "Add \"export PATH=\$PATH:~/bin\" to your PATH environment variable"
82
+ fi
83
+ fi
84
+
85
+ echo "Installed:"
86
+ echo " mut"
87
+ echo " mut-build"
88
+ echo " mut-convert-redirects"
89
+ echo " mut-images"
90
+ echo " mut-index"
91
+ echo " mut-intersphinx"
92
+ echo " mut-lint"
93
+ echo " mut-publish"
94
+ echo " mut-redirects"
95
+
96
+ working_dir : docs-mongodb
97
+ -
98
+ command : shell.exec
99
+ params :
100
+ script : |
34
101
# remember that this script should be silent if it
35
102
# manipulates keys
36
103
mkdir ~/.config
@@ -48,7 +115,6 @@ tasks:
48
115
params :
49
116
script : |
50
117
export USER=${github_author}
51
- . ${venv}/activate
52
118
53
119
if [ "${is_patch}" != "true" ]; then
54
120
make publish
0 commit comments