From 17255dea086fd95937cb79019736573b257fbe5a Mon Sep 17 00:00:00 2001 From: ray Date: Fri, 20 Mar 2020 14:18:56 +0000 Subject: [PATCH] replace hardcoded user name --- config/tmux.sh | 6 +++--- config/zsh.sh | 8 ++++---- dev-setup/nvim.sh | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/config/tmux.sh b/config/tmux.sh index de0c4a8..e3c5a86 100755 --- a/config/tmux.sh +++ b/config/tmux.sh @@ -17,8 +17,8 @@ if [ -h .tmux ] ; then elif [ -f .tmux ] ; then mv .tmux .tmux.backup fi -su ray -c 'git clone https://git.rayelliott.dev/dots/tmux.git .config/tmux' -su ray -c 'ln -bfs .config/tmux/tmux.conf .tmux.conf' -su ray -c 'ln -bfs .config/tmux/tmux .tmux' +su "$_user" -c 'git clone https://git.rayelliott.dev/dots/tmux.git .config/tmux' +su "$_user" -c 'ln -bfs .config/tmux/tmux.conf .tmux.conf' +su "$_user" -c 'ln -bfs .config/tmux/tmux .tmux' cd .config/tmux ln -bfs tmux.colours-base16.conf tmux.colours.conf diff --git a/config/zsh.sh b/config/zsh.sh index f632163..d0ce786 100755 --- a/config/zsh.sh +++ b/config/zsh.sh @@ -13,12 +13,12 @@ fi mkdir -p /home/"$_user"/.config cd /home/"$_user" rm -Rf .config/zsh -su ray -c 'git clone https://git.rayelliott.dev/dots/zsh.git .config/zsh' -su ray -c 'git clone https://github.com/tarjoilija/zgen.git .config/zsh/zgen' -su ray -c 'ln -bfs .config/zsh/zshrc .zshrc' +su "$_user" -c 'git clone https://git.rayelliott.dev/dots/zsh.git .config/zsh' +su "$_user" -c 'git clone https://github.com/tarjoilija/zgen.git .config/zsh/zgen' +su "$_user" -c 'ln -bfs .config/zsh/zshrc .zshrc' # set interactive shell _zsh=$(command -v zsh) if [ -f "$_zsh" ] ; then - chsh ray -s "$_zsh" + chsh "$_user" -s "$_zsh" fi diff --git a/dev-setup/nvim.sh b/dev-setup/nvim.sh index d2292cf..d497b9f 100755 --- a/dev-setup/nvim.sh +++ b/dev-setup/nvim.sh @@ -24,11 +24,11 @@ fi mkdir -p /home/"$_user"/.config cd /home/"$_user" rm -Rf .config/nvim -su ray -c 'git clone https://git.rayelliott.dev/dots/nvim.git .config/nvim' +su "$_user" -c 'git clone https://git."$_user"elliott.dev/dots/nvim.git .config/nvim' -su ray --login -c 'yarn global add neovim' +su "$_user" --login -c 'yarn global add neovim' -su ray --login -c 'python2 -m pip install --user --upgrade pynvim' -su ray --login -c 'python3 -m pip install --user --upgrade pynvim' +su "$_user" --login -c 'python2 -m pip install --user --upgrade pynvim' +su "$_user" --login -c 'python3 -m pip install --user --upgrade pynvim' -su ray --login -c 'nvim --headless +PlugInstall +qall' +su "$_user" --login -c 'nvim --headless +PlugInstall +qall'