From: Kefu Chai Date: Thu, 14 Dec 2017 11:06:51 +0000 (+0800) Subject: install-deps.sh: use tee for writing a file X-Git-Tag: v13.0.1~8^2~4 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=020f641bdffe0a0df9be18c24584b7c8e3b5fddd;p=ceph-ci.git install-deps.sh: use tee for writing a file because the stdout redirect is performed by current shell not `$SUDO cat`, so $SUDO does not help here. use `$SUDO tee` instead, which is able to read the stdin and write to the given file just as expected. Signed-off-by: Kefu Chai (cherry picked from commit 0beb846e57b94786e84c35927fe5ef3a67857fa3) --- diff --git a/install-deps.sh b/install-deps.sh index 75728e81e24..b8c1f8a1b3f 100755 --- a/install-deps.sh +++ b/install-deps.sh @@ -38,7 +38,7 @@ function ensure_decent_gcc_on_deb { local dist=$(lsb_release --short --codename) if [ ! -f /usr/bin/g++-${new} ]; then - $SUDO cat > /etc/apt/sources.list.d/ubuntu-toolchain-r.list <