#!/bin/sh
# Prepare .nodenv enviroment and inject shims into PATH for psacln members

if id -Gn | grep -q '\bpsacln\b'; then
	if [ ! -e ~/.nodenv ] ; then
		mkdir -p ~/.nodenv
		ln -snfT "/opt/plesk/node" ~/.nodenv/versions
	fi

	eval "$(nodenv init -)"
fi
