diff /etc/skel/.bashrc
This commit is contained in:
+1
-1
@@ -37,7 +37,7 @@ function fix_users_bashrc {
|
|||||||
cmp -s "$user_bashrc" /etc/skel/.bashrc && next
|
cmp -s "$user_bashrc" /etc/skel/.bashrc && next
|
||||||
|
|
||||||
local first_change
|
local first_change
|
||||||
first_change=$(diff /etc/skel/.bashrc "$user" | head -n1)
|
first_change=$(diff /etc/skel/.bashrc "$user_bashrc" | head -n1)
|
||||||
|
|
||||||
if [[ $first_change =~ $appended_regex ]]; then
|
if [[ $first_change =~ $appended_regex ]]; then
|
||||||
sudo -u "$user" -- cp "$MIAOU_BASH_DIR"/etc/skel/.bashrc "$user_bashrc"
|
sudo -u "$user" -- cp "$MIAOU_BASH_DIR"/etc/skel/.bashrc "$user_bashrc"
|
||||||
|
|||||||
Reference in New Issue
Block a user