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