#!/usr/bin/with-contenv bash echo "**** installing nodejs dev environment ****" NODEJS_MOD_VERSION=${NODEJS_MOD_VERSION:-16} if [[ ! -f "/etc/apt/sources.list.d/nodesource.list" ]]; then curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor | tee /usr/share/keyrings/nodesource.gpg >/dev/null echo "deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODEJS_MOD_VERSION}.x nodistro main" \ > /etc/apt/sources.list.d/nodesource.list fi if [[ ! -f "/etc/apt/sources.list.d/yarn.list" ]]; then curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /usr/share/keyrings/yarnsource.gpg >/dev/null echo 'deb [signed-by=/usr/share/keyrings/yarnsource.gpg] https://dl.yarnpkg.com/debian/ stable main' \ > /etc/apt/sources.list.d/yarn.list fi echo "**** Adding nodejs and yarn to package install list ****" echo "\ nodejs \ yarn" >> /mod-repo-packages-to-install.list