#!/bin/sh

#This can be 'sprsh' or 'wine'
REMOTE_METHOD=sprsh

# Edit
NTHOST=10.0.4.10
NTDRIVE='j:'

# What dir on the UNIX machine is on $NTDRIVE ?
# This variable MUST NOT end with a slash.
NTMOUNT=

# Use Simple Pike Remote SHell?
USE_SPRSH=yes

# Port for sprsh
NTPORT=4711

#These are only used if you use wine
watcom=D:\\CDROM
INCLUDE="$watcom\\H;$watcom\\H\\NT"

# Don't edit

base=`pwd`

NP=$base/tools

case :$PATH: in
   *:$NP:*) ;;
   *) PATH=$NP:$PATH ;;
esac
CC=rntcc
NTTOOLS=$NP/lib
if [ "x$NTMOUNT" = x ]; then
  MNTREPLACE=""
else
  MNTREPLACE="s@$NTMOUNT@@g
"
fi
IFS=' 	

'

export NTHOST NTDRIVE NTCC CC PATH NTTOOLS MNTREPLACE MNTREPLACE 
export NTPORT USE_SPRSH NTMOUNT IFS REMOTE_METHOD watcom INCLUDE

case /$SHELL-$TERM in
   */bash-xterm)
     PROMPT_COMMAND="echo -n ]2\; $REMOTE_METHOD NT compile ]1\; rntcc"
     export PROMPT_COMMAND
   ;;
esac

case /$SHELL in
   */bash)
     if [ $REMOTE_METHOD = sprsh ]; then
       PS1="NT $NTHOST \\$ "
     else
       PS1="WINE \\$ "
     fi
     export PS1
   ;;
esac


case /$0 in
  */init_nt)
    exec $SHELL
  ;;
esac
