#!/bin/sh

V2X_DIR=/usr/local/src/Vrml97ToX3dNist_v1.0/
if test -d $V2X_DIR ; then
    echo > /dev/null
else
    echo path to Vrml97ToX3dNist_v1.0 not found 1>&2
    echo change V2X_DIR= in $0 1>&2
    exit 1
fi

CLASSPATH=$V2X_DIR/Vrml97ToX3dNist.jar:"$CLASSPATH"
export CLASSPATH

ARG1=/tmp/v2x3d_$$.wrl
awk 'BEGIN {print "#VRML V2.0 utf8";} {if (i++ > 2) print $0}' $1 > $ARG1

java iicm.vrml.vrml2x3d.vrml2x3d $ARG1 $2

