#!/bin/bash set -e REPO_ROOT="${BASH_SOURCE%/*}/.." source "$REPO_ROOT/bin/common" VENDOR_ROOT="$REPO_ROOT/vendor" N_EXE="$VENDOR_ROOT/n/bin/n" N_PREFIX="$VENDOR_ROOT/node" export N_PREFIX if [[ ! -x $N_EXE ]]; then log_error "No executable at $N_EXE; did you forget to \`git submodule update\`?" exit 1 fi if ! "$N_EXE" which latest &> /dev/null; then log_info "Installing Node latest version" "$N_EXE" latest else log_debug "Using Node latest installation" fi "$N_EXE" "$@"