#!/bin/bash

## check to NODEJS_HOME being set

if [ "x$NODE_HOME" = "x" ] ; then
    echo "****" >&2
    echo "* Warning: NODE_HOME was not set." >&2
    echo "* This extension has been developed to run with Greenstone's self-contained NodeJS" >&2
    echo "* Have you run get-selfcontained-nodejs.sh in \$GSDL3SRCHOME/ext-cli?" >&2    
    echo "**** " >&2
fi
    

cd src/winbox-with-interactjs \
    && echo "Running npm install in src/winbox-with-interact" \
    && npm install \


if [ $? = 0 ] ; then
    echo ""
    echo "----"
    echo "Now run:"
    echo "  ./03-COMPILE.sh"
    echo "----"
    echo ""

fi
	   
