-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-graphmaker.sh
31 lines (27 loc) · 1.04 KB
/
install-graphmaker.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
#!/bin/bash
# Check if curl or wget is installed:
if ! command -v curl >/dev/null && ! command -v wget >/dev/null; then
echo "We cannot find curl or wget. Please install curl or wget and try again."
exit 1
fi
# Check if Node.js / npm is installed:
if ! command -v node >/dev/null; then
echo "Installing Node.js via nvm"
if command -v curl >/dev/null; then
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
else
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
fi
source ~/.bashrc
nvm install node
fi
if ! (npm list -g @isle-labs/graphmaker > /dev/null) then
npm install -g @isle-labs/graphmaker
echo "Use the :config command to set your API key from within the session."
echo "You can set up a configuration file in ~/.graphmaker.json that sets this persistently."
echo ""
fi
echo "graphmaker (version $(graphmaker --version)) has been installed."
echo "You can start GraphMaker from your terminal by typing 'graphmaker' at the prompt."
exit 0
## exec graphmaker $*