e3fa691997-12-28Fredrik Hübinette (Hubbe) CLEANUP=yes
0dd2b11998-01-13Fredrik Hübinette (Hubbe) NT_DEBUG=no
e3fa691997-12-28Fredrik Hübinette (Hubbe) 
0dd2b11998-01-13Fredrik Hübinette (Hubbe) if [ $NT_DEBUG = yes ]; then
e3fa691997-12-28Fredrik Hübinette (Hubbe)  set -x fi fixpath() {
34f8f01998-01-16Fredrik Hübinette (Hubbe)  echo "$*" | sed -e "${MNTREPLACE}s@/@\\\\@g"
e3fa691997-12-28Fredrik Hübinette (Hubbe) } fixabspath() {
1e1fb61998-01-16Fredrik Hübinette (Hubbe)  fixpath "$*"
e3fa691997-12-28Fredrik Hübinette (Hubbe) }
0dd2b11998-01-13Fredrik Hübinette (Hubbe) getntenv() {
a1ad681998-01-16Fredrik Hübinette (Hubbe)  if [ $USE_SPRSH = yes ]; then sprsh getenv $1 else rsh $NTHOST set $1 | egrep "^$1=" | sed 's/^.*=//
0dd2b11998-01-13Fredrik Hübinette (Hubbe) s/ //g'
a1ad681998-01-16Fredrik Hübinette (Hubbe)  fi
0dd2b11998-01-13Fredrik Hübinette (Hubbe) }
e3fa691997-12-28Fredrik Hübinette (Hubbe) silent_do_cmd() {
a1ad681998-01-16Fredrik Hübinette (Hubbe)  if [ $USE_SPRSH = yes ]; then
47a5f41998-01-21Fredrik Hübinette (Hubbe)  sprsh "$@"
e3fa691997-12-28Fredrik Hübinette (Hubbe)  else
a1ad681998-01-16Fredrik Hübinette (Hubbe)  BATFILE=TMP$$.bat PWD=`pwd` RPWD=`fixabspath $PWD` if [ x$NT_DEBUG != xyes ]; then echo >$BATFILE "@echo off " else echo >$BATFILE fi echo >>$BATFILE "$NTDRIVE " echo >>$BATFILE "cd $RPWD "
47a5f41998-01-21Fredrik Hübinette (Hubbe)  echo >>$BATFILE "$@ "
a1ad681998-01-16Fredrik Hübinette (Hubbe)  rsh $NTHOST $NTDRIVE$RPWD\\$BATFILE if [ x$CLEANUP = xyes ]; then rm $BATFILE || : fi
e3fa691997-12-28Fredrik Hübinette (Hubbe)  fi } do_cmd() {
09ca251998-01-16Fredrik Hübinette (Hubbe)  echo "DOING $*" >&2
0dd2b11998-01-13Fredrik Hübinette (Hubbe)  silent_do_cmd "$@"
e3fa691997-12-28Fredrik Hübinette (Hubbe) }
5a7ab61998-01-31Fredrik Hübinette (Hubbe)