Megatest

Artifact [8a5014b010]
Login

Artifact 8a5014b0108f05e13e62c6d282b036a8451503c3:


#!/bin/bash

# ssh localhost "nohup $* > nbfake.log 2> nbfake.err < /dev/null"

# Can't always trust $PWD
CURRWD=`pwd`

if [[ $TARGETHOST == ""  ]]; then
  exec sh -c "cd $CURRWD;export DISPLAY=$DISPLAY; export PATH=$PATH; nohup $* > NBFAKE-`date +%GWW%V.%u_%T` 2>&1 &"
else
  exec ssh -n -f $TARGETHOST "sh -c \"cd $CURRWD;export DISPLAY=$DISPLAY; export PATH=$PATH; nohup $* > NBFAKE-`date +%GWW%V.%u_%T` 2>&1 &\""
fi