Commit ead2c1a 1 parent e4bfbd5 commit ead2c1a Copy full SHA for ead2c1a
File tree 1 file changed +20
-9
lines changed
1 file changed +20
-9
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -e
3
3
4
+
5
+
4
6
# check and install dependencies
7
+ if ! command -v pip3 & > /dev/null; then
8
+ sudo apt update
9
+ sudo apt install -y python3-pip
10
+ fi
11
+
5
12
if ! pip3 show jsonschema & > /dev/null; then
6
13
pip3 install jsonschema
7
14
fi
@@ -15,16 +22,20 @@ if ! command -v 7z &> /dev/null; then
15
22
fi
16
23
17
24
if ! command -v mdpdf & > /dev/null; then
18
- export NVM_DIR=" $HOME /.nvm"
19
- [ -s " $NVM_DIR /nvm.sh" ] && \. " $NVM_DIR /nvm.sh" # This loads nvm
20
25
21
- if ! command -v mdpdf & > /dev/null; then
22
- curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
23
- source ~ /.bashrc
24
- nvm list-remote
25
- nvm install v22.3.0
26
- nvm list
27
- npm install mdpdf -g
26
+ # check if directory $HOME/.nvm exists:
27
+ if [ ! -d " $HOME /.nvm" ]; then
28
+ if ! command -v mdpdf & > /dev/null; then
29
+ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
30
+ source ~ /.bashrc
31
+ nvm list-remote
32
+ nvm install v22.3.0
33
+ nvm list
34
+ npm install mdpdf -g
35
+ fi
36
+ else
37
+ export NVM_DIR=" $HOME /.nvm"
38
+ [ -s " $NVM_DIR /nvm.sh" ] && \. " $NVM_DIR /nvm.sh" # This loads nvm
28
39
fi
29
40
fi
30
41
You can’t perform that action at this time.
0 commit comments