mirror of
https://github.com/nix-community/home-manager
synced 2024-11-10 15:14:26 +00:00
home-environment: run file collision check in function
This commit is contained in:
parent
ecf7d91d8b
commit
a9da4575f5
1 changed files with 8 additions and 3 deletions
|
@ -271,9 +271,14 @@ in
|
|||
'';
|
||||
in
|
||||
''
|
||||
newGenFiles="$(readlink -e "$newGenPath/home-files")"
|
||||
find "$newGenFiles" -type f -print0 -or -type l -print0 \
|
||||
| xargs -0 bash ${check} "$newGenFiles"
|
||||
function checkNewGenCollision() {
|
||||
local newGenFiles
|
||||
newGenFiles="$(readlink -e "$newGenPath/home-files")"
|
||||
find "$newGenFiles" -type f -print0 -or -type l -print0 \
|
||||
| xargs -0 bash ${check} "$newGenFiles"
|
||||
}
|
||||
|
||||
checkNewGenCollision || exit 1
|
||||
''
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue