From d9b53a53eaf1326c4eb1b7ebf39dd6d574d4593d Mon Sep 17 00:00:00 2001 From: gryf Date: Fri, 4 Oct 2019 12:48:24 +0200 Subject: [PATCH] Replace non working redirections with tee --- bootstrap_centos7.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bootstrap_centos7.sh b/bootstrap_centos7.sh index 71e9abf..e0d975f 100755 --- a/bootstrap_centos7.sh +++ b/bootstrap_centos7.sh @@ -14,10 +14,9 @@ sudo yum install -y $PGS sudo yum -y clean all # 4. set default editor -sudo cat <>/etc/profile.d/vim.sh -export VISUAL="vim" -export EDITOR="vim" -EOF +echo 'export VISUAL="vim"' | sudo tee /etc/profile.d/vim.sh +echo 'export EDITOR="vim"' | sudo tee -a /etc/profile.d/vim.sh + # 5. install tools from pypi if $(pip list |grep -e rainbow -e remote-pdb|wc -l|grep -qv 2); then @@ -42,7 +41,7 @@ fi # make current user sudo passwordless if [ -z "$(sudo grep "${USER}" /etc/sudoers)" ]; then - sudo "echo ${USER} ALL = (ALL) NOPASSWD: ALL >> /etc/sudoers" + echo "${USER} ALL = (ALL) NOPASSWD: ALL" | sudo tee -a /etc/sudoers fi # clone devstack