Better handling of output.txt
@@ -276,9 +276,6 @@ fi
export TURBINE_OUTPUT
declare TURBINE_OUTPUT
-# All output from job, including error stream
-export OUTPUT_FILE=${TURBINE_OUTPUT}/output.txt
-
mkdir -p ${TURBINE_OUTPUT}
if [[ ${OUTPUT_SOFTLINK} != /dev/null ]]
then
@@ -290,6 +287,11 @@ then
print ${TURBINE_OUTPUT} > ${OUTPUT_TOKEN_FILE}
fi
+# All output from job, including error stream
+export OUTPUT_FILE=${TURBINE_OUTPUT}/output.txt
+# Create the file now so the user can tail it immediately
+touch ${OUTPUT_FILE}
+
if [[ ${INIT_SCRIPT} != 0 ]]
then
print "executing: ${INIT_SCRIPT}"
