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() { rsh $NTHOST set $1 | egrep "^$1=" | sed 's/^.*=// s/ //g' }
e3fa691997-12-28Fredrik Hübinette (Hubbe) silent_do_cmd() { BATFILE=TMP$$.bat PWD=`pwd` RPWD=`fixabspath $PWD`
0dd2b11998-01-13Fredrik Hübinette (Hubbe)  if [ x$NT_DEBUG != xyes ]; then
3d859b1998-01-16Fredrik Hübinette (Hubbe)  echo >$BATFILE "@echo off "
e3fa691997-12-28Fredrik Hübinette (Hubbe)  else echo >$BATFILE fi
3d859b1998-01-16Fredrik Hübinette (Hubbe)  echo >>$BATFILE "$NTDRIVE " echo >>$BATFILE "cd $RPWD " echo >>$BATFILE "$* "
e3fa691997-12-28Fredrik Hübinette (Hubbe)  rsh $NTHOST $NTDRIVE$RPWD\\$BATFILE if [ x$CLEANUP = xyes ]; then rm $BATFILE || : 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) }