run before custom scripts

This commit is contained in:
aptalca
2020-04-01 17:26:41 -04:00
parent 4eb044e637
commit 5f4d4e806a
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/with-contenv bash
echo "**** installing nodejs dev environment ****"
if ! dpkg -l | grep gnupg > /dev/null; then
apt-get update && apt-get install -y gnupg
fi
[[ ! -f "/etc/apt/sources.list.d/nodesource.list" ]] && \
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
echo 'deb https://deb.nodesource.com/node_12.x bionic main' \
> /etc/apt/sources.list.d/nodesource.list
[[ ! -f "/etc/apt/sources.list.d/yarn.list" ]] && \
curl -s https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo 'deb https://dl.yarnpkg.com/debian/ stable main' \
> /etc/apt/sources.list.d/yarn.list
apt-get update && apt-get install -y \
nodejs \
yarn