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.2~781^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F19516%2Fhead;p=ceph.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 --- diff --git a/install-deps.sh b/install-deps.sh index 75728e81e24f..b8c1f8a1b3fd 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 <