From cd9b7f18e0bf481cde0aa1e25f9dba3dc3fe44be Mon Sep 17 00:00:00 2001 From: osbm Date: Mon, 10 Apr 2023 19:14:47 +0300 Subject: [PATCH] add missing configurations to the installation script --- install.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index a1088dc..7e423b4 100755 --- a/install.sh +++ b/install.sh @@ -20,10 +20,19 @@ link_file() { mv ~/$1 ~/Documents/temp/old_config_files/$1 fi + # if that folder exists, move it to the temp folder + if [ -d ~/$1 ]; then + echo "Moving ~/$1 to ~/Documents/temp/old_config_files/$1" + # lets create that folder if it doesn't exist + # get the folder name of the &1 + mkdir -p ~/Documents/temp/old_config_files/$(dirname $1) + mv ~/$1 ~/Documents/temp/old_config_files/$1 + fi + # if that file is already a symlink, remove it if [ -L ~/$1 ]; then echo "Removing ~/$1" - rm ~/$1 + rm -rf ~/$1 fi echo "Linking ~/$1 to ~/Documents/GitHub/dotfiles/src/$1" @@ -33,5 +42,8 @@ link_file() { link_file .zshrc ~ link_file .zprofile ~ link_file .gitconfig ~ +link_file .i3/ ~/ link_file .config/i3-scrot.conf ~/.config -link_file .config/nitrogen/nitrogen.cfg ~/.config/nitrogen/ \ No newline at end of file +link_file .config/nitrogen/ ~/.config/ +link_file .config/flameshot/ ~/.config/ +link_file .config/polybar/ ~/.config/