mirror of
https://github.com/YunoHost/ynh-dev.git
synced 2024-09-03 20:05:59 +02:00
readd nodejs keyring stuff
This commit is contained in:
parent
4f87cbce82
commit
0e94668abf
1 changed files with 13 additions and 5 deletions
10
ynh-dev
10
ynh-dev
|
@ -332,8 +332,16 @@ EOF
|
||||||
# Vite require node v14 to parse modern syntax
|
# Vite require node v14 to parse modern syntax
|
||||||
if [[ ! $(node -v) == v14* ]]
|
if [[ ! $(node -v) == v14* ]]
|
||||||
then
|
then
|
||||||
|
DISTRO="$(lsb_release -s -c)"
|
||||||
|
if [ "$DISTRO" == "buster" ]; then
|
||||||
info "Installing node v14..."
|
info "Installing node v14..."
|
||||||
curl -fsSL https://deb.nodesource.com/setup_14.x | bash -
|
KEYRING=/usr/share/keyrings/nodesource.gpg
|
||||||
|
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | sudo tee "$KEYRING" >/dev/null
|
||||||
|
gpg --no-default-keyring --keyring "$KEYRING" --list-keys
|
||||||
|
VERSION=node_14.x
|
||||||
|
echo "deb [signed-by=$KEYRING] https://deb.nodesource.com/$VERSION $DISTRO main" | sudo tee /etc/apt/sources.list.d/nodesource.list
|
||||||
|
fi
|
||||||
|
apt-get update
|
||||||
apt install nodejs -y
|
apt install nodejs -y
|
||||||
# to return to nodejs debian version
|
# to return to nodejs debian version
|
||||||
# apt purge nodejs && rm -r /etc/apt/sources.list.d/nodesource.list && apt install nodejs
|
# apt purge nodejs && rm -r /etc/apt/sources.list.d/nodesource.list && apt install nodejs
|
||||||
|
|
Loading…
Add table
Reference in a new issue