mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-09 15:58:05 +02:00
Merge pull request #7593 from miallo/ignore-identical-rc-backup-files-for-installation
install-multi-user: ignore profile_target backups that have no change
This commit is contained in:
commit
e304e8d053
1 changed files with 8 additions and 0 deletions
|
@ -452,6 +452,14 @@ EOF
|
|||
# a row for different files.
|
||||
if [ -e "$profile_target$PROFILE_BACKUP_SUFFIX" ]; then
|
||||
# this backup process first released in Nix 2.1
|
||||
|
||||
if diff -q "$profile_target$PROFILE_BACKUP_SUFFIX" "$profile_target" > /dev/null; then
|
||||
# a backup file for the rc-file exist, but they are identical,
|
||||
# so we can safely ignore it and overwrite it with the same
|
||||
# content later
|
||||
continue
|
||||
fi
|
||||
|
||||
failure <<EOF
|
||||
I back up shell profile/rc scripts before I add Nix to them.
|
||||
I need to back up $profile_target to $profile_target$PROFILE_BACKUP_SUFFIX,
|
||||
|
|
Loading…
Reference in a new issue