Skip to content

Commit

Permalink
fix nvm assumption
Browse files Browse the repository at this point in the history
  • Loading branch information
stebo85 committed Jun 24, 2024
1 parent e4bfbd5 commit ead2c1a
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions recipes/build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#!/bin/bash
set -e



# check and install dependencies
if ! command -v pip3 &> /dev/null; then
sudo apt update
sudo apt install -y python3-pip
fi

if ! pip3 show jsonschema &> /dev/null; then
pip3 install jsonschema
fi
Expand All @@ -15,16 +22,20 @@ if ! command -v 7z &> /dev/null; then
fi

if ! command -v mdpdf &> /dev/null; then
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

if ! command -v mdpdf &> /dev/null; then
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
source ~/.bashrc
nvm list-remote
nvm install v22.3.0
nvm list
npm install mdpdf -g
# check if directory $HOME/.nvm exists:
if [ ! -d "$HOME/.nvm" ]; then
if ! command -v mdpdf &> /dev/null; then
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
source ~/.bashrc
nvm list-remote
nvm install v22.3.0
nvm list
npm install mdpdf -g
fi
else
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
fi
fi

Expand Down

0 comments on commit ead2c1a

Please sign in to comment.