#!/bin/sh

for DEMO in *
do
	if [ -d $DEMO ]
	then
		if [ -f "$DEMO/${DEMO##*/}.js" ];
		then
			cd $DEMO
			echo "$DEMO running"
			node "${DEMO##*/}.js"
			cd ..
			echo "$DEMO finished. Press enter to continue..."
			read -p "$*" a
		fi
	fi
done
