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() { echo "$*" | sed -e 's@/@\\@g' } fixabspath() { echo "$*" | sed -e 's@/@\\@g' }
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
e3fa691997-12-28Fredrik Hübinette (Hubbe)  echo >$BATFILE "@echo off" else echo >$BATFILE fi echo >>$BATFILE "$NTDRIVE" echo >>$BATFILE "cd $RPWD" echo >>$BATFILE "$*" rsh $NTHOST $NTDRIVE$RPWD\\$BATFILE if [ x$CLEANUP = xyes ]; then rm $BATFILE || : fi } do_cmd() { echo "DOING $*"
0dd2b11998-01-13Fredrik Hübinette (Hubbe)  silent_do_cmd "$@"
e3fa691997-12-28Fredrik Hübinette (Hubbe) }