From 45f0c5690e4b9f0f89dadf39703a4065e834a6bd Mon Sep 17 00:00:00 2001 From: pvincent Date: Thu, 20 Aug 2026 17:42:03 +0400 Subject: [PATCH] diff /etc/skel/.bashrc --- lib/initiate.bash | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/initiate.bash b/lib/initiate.bash index 67e01d1..468e963 100644 --- a/lib/initiate.bash +++ b/lib/initiate.bash @@ -43,16 +43,15 @@ function fix_users_bashrc { local first_change if first_change=$(diff /etc/skel/.bashrc "$user_bashrc" | head -n1); then - : + echo 'no change' + sudo -u "$user" -- cp "$MIAOU_BASH_DIR"/etc/skel/.bashrc "$user_bashrc" else if [[ $first_change =~ $appended_regex ]]; then if new_lines=$(diff /etc/skel/.bashrc "$user_bashrc" | grep '^> ' | sed 's/^> //'); then - : + echo 'no new lines' else - # echo -e "$new_lines" - sudo -u "$user" -- cp "$MIAOU_BASH_DIR"/etc/skel/.bashrc "$user_bashrc" - echo -e "$new_lines" | sudo -u $user -- tee -a "$user_bashrc" + echo -e "$new_lines" | sudo -u "$user" -- tee -a "$user_bashrc" echo "INFO: .bashrc for user <$user> merged succesfully" fi else