@@ -22,76 +22,47 @@ tasks:
2222 command : shell.exec
2323 params :
2424 script : |
25- rm -rf ~/venv
26-
27- virtualenv ~/venv
28- ${venv}/pip install -r requirements.txt
29- working_dir : docs-mongodb
30- -
31- command : shell.exec
32- params :
33- script : |
3425
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
26+ # install_helper(name)
27+ install_helper() {
28+ if [ -z "$1" ]; then
29+ echo "No helper given to install_helper"
30+ exit 1
31+ fi
4532
46- ( cd mut && python3 -m pip install -r requirements.txt . )
47- )
33+ printf '#!/bin/sh\n' > "~/venv/bin/$1"
34+ printf '. ~/venv/bin/activate\n' >> "~/venv/bin/$1"
35+ printf '~/venv/bin/%s $@\n' "$1" >> "~/venv/bin/$1"
36+ chmod 755 "~/venv/bin/$1"
37+ }
4838
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
39+ rm -rf ~/venv
40+
41+ virtualenv ~/venv
42+ ${venv}/pip install -r requirements.txt
5843
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
44+ # Modified build for mut
45+ ${venv}/bin/activate
6646
67- if [ -r ~/.zshenv ]; then
68- rc_files+=(~/.zshenv)
69- elif [ -r ~/.zshrc ]; then
70- rc_files+=(~/.zshrc)
71- fi
47+ python3 -m pip install -qqq --upgrade pip || true
7248
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
49+ cd ~/venv
50+ mkdir dev
51+ cd dev
52+ git clone --depth=1 https://github.com/mongodb/mut.git
53+ cd mut && python3 -m pip install -r requirements.txt .
7754
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
55+ # install_helper mut
56+ # install_helper mut-build
57+ # install_helper mut-convert-redirects
58+ # install_helper mut-images
59+ # install_helper mut-index
60+ # install_helper mut-intersphinx
61+ # install_helper mut-lint
62+ # install_helper mut-publish
63+ # install_helper mut-redirects
8464
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"
65+ PATH=$PATH:~/venv/bin
9566
9667 working_dir : docs-mongodb
9768 -
0 commit comments