#!/bin/sh
#
#
# Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
# ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
#

for arg in "$@" ; do
   case $arg in
      startxterm)
          newdir="$2"
          if [ ! -d $newdir ]
          then
              exit -1
          fi
          cd $2
          if [ $? -ne 0 ]
          then
              exit -1
          fi
          if [ "$TERM" = "" ]
          then
               TERM=xterm
          fi
          echo $newdir
          $TERM &
          exit 0
          break
          ;;
   esac
done
exit 0
