-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure
executable file
·43 lines (35 loc) · 1 KB
/
configure
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
#!/bin/bash
##########################################################################
# File Name : configure
# Encoding : utf-8
# Author : We-unite
# Email : [email protected]
# Created Time : 2024-05-14 13:27:13
##########################################################################
set -e
# if user is root, then exit
if [ "$EUID" -eq 0 ]; then
echo "Please do not run as root"
exit
fi
if ! command -v npm &> /dev/null; then
echo "Installing npm..."
sudo apt install npm -y
fi
if ! command -v node &> /dev/null; then
echo "Installing nodejs..."
sudo apt install nodejs -y
fi
# check if there is mermaid-cli in $PATH
if ! command -v mmdc &> /dev/null; then
echo "Installing mermaid-cli..."
export PUPPETEER_SKIP_DOWNLOAD=true
npm install -g @mermaid-js/mermaid-cli
fi
# check google-chrome
if ! command -v google-chrome &> /dev/null; then
echo "We need Chrome."
echo "Installing google-chrome..."
sudo apt install google-chrome-stable -y
fi
echo "Env config done!"