-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
51 lines (34 loc) · 1.2 KB
/
setup.sh
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
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
#set -e
rm -rf /home/terry/
pacman -Syy
# pacman -Su --noconfirm
pacman --noconfirm -S cython ipython python-pip python-wheel vim git debootstrap pandoc
pip install pypandoc Pygments
# lets install debian in the background
systemd-run --unit install-debian.service /usr/bin/debootstrap --include "dbus,vim" unstable /var/lib/machines/debian
# install pystemd
git clone https://github.com/facebookincubator/pystemd /usr/src/pystemd &&
cd /usr/src/pystemd &&
rm -rf dist/* &&
python setup.py bdist_wheel &&
pip install dist/* || /bin/true
mkdir -p /usr/share/venvs.conf
cat <<EOT > /usr/share/venvs.conf/pyvenv-wo-site-packages.cfg
home = /usr/bin
include-system-site-packages = false
version = 3.6.5
EOT
cat <<EOT > /usr/share/venvs.conf/pyvenv-w-site-packages.cfg
home = /usr/bin
include-system-site-packages = true
version = 3.6.5
EOT
cat <<EOT >> /home/vagrant/.bashrc
test -e /var/lib/machines/debian/etc/os-release || systemctl -q is-active install-debian.service ||\
sudo systemd-run --unit install-debian.service /usr/bin/debootstrap --include "dbus,vim" unstable /var/lib/machines/debian || /bin/true
test -z "\${INVOCATION_ID}" && sudo tmux
EOT
cat <<EOT >> /root/.bashrc
cd /srv/pycon
EOT