From: Kefu Chai Date: Thu, 28 Dec 2017 02:18:11 +0000 (+0800) Subject: install-deps.sh: check if have access to stdout X-Git-Tag: v12.2.13~109^2~17 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c17abe640fa3bfe38e08393bd3620ce3870eb087;p=ceph.git install-deps.sh: check if have access to stdout $- is "hB" if launched via command line, and it is "himBH" only when we are actually *in* an interactive shell. so checking "test -t 1" is what we want. Signed-off-by: Kefu Chai (cherry picked from commit 7bb8f66cf4e2519c33f1078c1be7485f9fe35a87) --- diff --git a/install-deps.sh b/install-deps.sh index e2a5421c22e7..350c22567bc4 100755 --- a/install-deps.sh +++ b/install-deps.sh @@ -71,10 +71,9 @@ function ensure_decent_gcc_on_rh { local expected=5.1 local dts_ver=$1 if version_lt $old $expected; then - case $- in - *i*) - # interactive shell - cat <