#!/bin/sh

if test "$EMPRESSPATH" = "" 
then
	echo "EMPRESSPATH not set"
	exit 1

elif test ! -d $EMPRESSPATH
then
	echo "invalid EMPRESSPATH"
	exit 1
fi

. $EMPRESSPATH/config/options

case $MSSYS_PLATFORM in
  SYS_OS_WIN32)
	PATH="$EMPRESSPATH/bin;$PATH"
	export PATH
	;;
esac

MODULEDIR=$EMPRESSPATH/hypmedia

for I in [a-zA-Z]*
do
	if test ! -d $I
	then
		continue
	fi

	for J in $I/*.rtm
	do
		if test ! -f $J
		then
			continue
		fi

		NAME=`echo "/$J" | sed -e 's/.*\///' -e 's/\..*//'`
		$MODULEDIR/ehtml/bin/emprtmc $J -o $I/$NAME.nls
	done
done
