changeset 4:58a9a644bd15

check for tty
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 13 Jun 2019 16:06:27 +0200
parents cd1231292eb6
children 83bafd79af97 7d2bc8ac883e
files Resources/holy-build-box-compile.sh
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Resources/holy-build-box-compile.sh	Thu Jun 13 15:50:25 2019 +0200
+++ b/Resources/holy-build-box-compile.sh	Thu Jun 13 16:06:27 2019 +0200
@@ -17,11 +17,16 @@
     exit -1
 fi
 
+if [ -t 1 ]; then
+    # TTY is available => use interactive mode
+    DOCKER_FLAGS='-i'
+fi
+
 ROOT_DIR=`dirname $(readlink -f $0)`/..
 
 mkdir -p ${ROOT_DIR}/holy-build-box
 
-docker run -t -i --rm \
+docker run -t ${DOCKER_FLAGS} --rm \
     --user $(id -u):$(id -g) \
     -v ${ROOT_DIR}:/source:ro \
     -v ${ROOT_DIR}/holy-build-box:/target:rw \