forked from p15670423/monkey
Don't randomly install npm unless required
This commit is contained in:
parent
6429bb5597
commit
8e109c4824
|
@ -174,14 +174,16 @@ openssl req -new -key cc/server.key -out cc/server.csr -subj "/C=GB/ST=London/L=
|
||||||
openssl x509 -req -days 366 -in cc/server.csr -signkey cc/server.key -out cc/server.crt
|
openssl x509 -req -days 366 -in cc/server.csr -signkey cc/server.key -out cc/server.crt
|
||||||
|
|
||||||
# Update node
|
# Update node
|
||||||
log_message "Installing nodejs"
|
if ! exists npm; then
|
||||||
# shellcheck disable=SC2086
|
log_message "Installing nodejs"
|
||||||
if exists curl; then
|
# shellcheck disable=SC2086
|
||||||
|
if exists curl; then
|
||||||
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
|
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
|
||||||
else
|
else
|
||||||
wget -q -O - https://deb.nodesource.com/setup_12.x | sudo -E bash -
|
wget -q -O - https://deb.nodesource.com/setup_12.x | sudo -E bash -
|
||||||
|
fi
|
||||||
|
sudo apt-get install -y nodejs
|
||||||
fi
|
fi
|
||||||
sudo apt-get install -y nodejs
|
|
||||||
|
|
||||||
cd "$ISLAND_PATH/cc/ui" || handle_error
|
cd "$ISLAND_PATH/cc/ui" || handle_error
|
||||||
npm install sass-loader node-sass webpack --save-dev
|
npm install sass-loader node-sass webpack --save-dev
|
||||||
|
|
Loading…
Reference in New Issue