From e4bdabf92a278f95fd8251ae7974e7e90658b75f Mon Sep 17 00:00:00 2001 From: clsty Date: Sat, 2 Mar 2024 19:07:21 +0800 Subject: [PATCH] Not overwrite user_options.js --- install.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 836c14f9d..bd5cf558a 100755 --- a/install.sh +++ b/install.sh @@ -146,14 +146,24 @@ v mkdir -p "$HOME"/.{config,cache,local/{bin,share}} # original dotfiles and new ones in the SAME DIRECTORY # (eg. in ~/.config/hypr) won't be mixed together -for i in .config/* -do +# For .config/* but not AGS +for file in $(find .config/ -mindepth 1 -maxdepth 1 ! -name 'ags' -exec basename {} \;); do echo "[$0]: Found target: $i" if [ -d "$i" ];then v rsync -av --delete "$i/" "$HOME/$i/" elif [ -f "$i" ];then v rsync -av "$i" "$HOME/$i" fi done +# For AGS +v rsync -av --delete --exclude '/user_options.js' .config/ags/ "$HOME"/.config/ags/ +t="$HOME/.config/ags/user_options.js" +if [ -f $t ];then + echo -e "\e[34m[$0]: \"$t\" already exists.\e[0m" +else + echo -e "\e[33m[$0]: \"$t\" does not exist yet.\e[0m" + v cp .config/ags/user_options.js $t +fi + # target="$HOME/.config/hypr/colors.conf" # test -f $target || { \ # echo -e "\e[34m[$0]: File \"$target\" not found.\e[0m" && \