forked from richo/babashka
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbootstrap.sh
More file actions
27 lines (26 loc) · 730 Bytes
/
bootstrap.sh
File metadata and controls
27 lines (26 loc) · 730 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
#!/bin/bash
if [[ -d /opt/babashka ]]; then
pushd /opt/babashka
sudo git pull
popd
else
sudo git clone https://github.com/aurynn/babashka /opt/babashka
fi
[[ -e /usr/bin/babashka ]] || \
sudo ln -s /opt/babashka/bin/babashka /usr/bin/babashka
[[ -d /etc/babashka ]] || \
sudo mkdir -p /etc/babashka
[[ -L /etc/babashka/dependencies ]] || \
sudo ln -s /opt/babashka/dependencies /etc/babashka/dependencies
[[ -L /etc/babashka/helpers ]] || \
sudo ln -s /opt/babashka/helpers /etc/babashka/helpers
if [[ -d /opt/mo ]]; then
pushd /opt/mo
sudo git pull
popd
else
sudo git clone https://github.com/tests-always-included/mo.git /opt/mo
fi
if ! [[ -e /usr/bin/mo ]]; then
sudo ln -s /opt/mo/mo /usr/bin/mo
fi