From 67412028ab4d59a0dc602c5e097107b92bc7f572 Mon Sep 17 00:00:00 2001 From: rohhie Date: Sun, 30 Apr 2023 10:21:26 +0900 Subject: [PATCH] Add file existence checks --- 91-teardown.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/91-teardown.sh b/91-teardown.sh index d5fdff6..619d55b 100755 --- a/91-teardown.sh +++ b/91-teardown.sh @@ -89,12 +89,12 @@ rvm implode sudo apt -y purge gnupg2 sudo apt -y autoremove -tac ~/.bashrc | sed '/# Load RVM/,+4 d' | tac > ~/elifkrow; [ -s ~/elifkrow ] && mv ~/elifkrow ~/.bashrc -tac ~/.bash_profile | sed '/# Load RVM/,+1 d' | tac > ~/elifkrow; [ -s ~/elifkrow ] && mv ~/elifkrow ~/.bash_profile -tac ~/.mkshrc | sed '/\.rvm\/bin/,+2 d' | tac > ~/elifkrow; [ -s ~/elifkrow ] && mv ~/elifkrow ~/.mkshrc -tac ~/.profile | sed '/# Load RVM/,+4 d' | tac > ~/elifkrow; [ -s ~/elifkrow ] && mv ~/elifkrow ~/.profile -tac ~/.zlogin | sed '/# Load RVM/,+1 d' | tac > ~/elifkrow; [ -s ~/elifkrow ] && mv ~/elifkrow ~/.zlogin -tac ~/.zshrc | sed '/\.rvm\/bin/,+2 d' | tac > ~/elifkrow; [ -s ~/elifkrow ] && mv ~/elifkrow ~/.zshrc +[ -f ~/.bashrc ] && tac ~/.bashrc | sed '/# Load RVM/,+4 d' | tac > ~/elifkrow; [ -s ~/elifkrow ] && mv ~/elifkrow ~/.bashrc +[ -f ~/.bash_profile ] && tac ~/.bash_profile | sed '/# Load RVM/,+1 d' | tac > ~/elifkrow; [ -s ~/elifkrow ] && mv ~/elifkrow ~/.bash_profile +[ -f ~/.mkshrc ] && tac ~/.mkshrc | sed '/\.rvm\/bin/,+2 d' | tac > ~/elifkrow; [ -s ~/elifkrow ] && mv ~/elifkrow ~/.mkshrc +[ -f ~/.profile ] && tac ~/.profile | sed '/# Load RVM/,+4 d' | tac > ~/elifkrow; [ -s ~/elifkrow ] && mv ~/elifkrow ~/.profile +[ -f ~/.zlogin ] && tac ~/.zlogin | sed '/# Load RVM/,+1 d' | tac > ~/elifkrow; [ -s ~/elifkrow ] && mv ~/elifkrow ~/.zlogin +[ -f ~/.zshrc ] && tac ~/.zshrc | sed '/\.rvm\/bin/,+2 d' | tac > ~/elifkrow; [ -s ~/elifkrow ] && mv ~/elifkrow ~/.zshrc [ -f ~/elifkrow ] && rm ~/elifkrow if [ $(cat .setupphase.txt) -eq 7 ]; then