diff options
author | Robert Helgesson <robert@rycee.net> | 2017-05-14 14:01:10 +0200 |
---|---|---|
committer | Robert Helgesson <robert@rycee.net> | 2017-05-14 14:02:11 +0200 |
commit | a9da4575f580778e44781bedaf5a33bd6f972219 (patch) | |
tree | 01c922389ec68b05b34c95cb758a5840c44a78a9 /modules/home-environment.nix | |
parent | ecf7d91d8bfcaeb44ba69d05ee0bff8a96ec2eee (diff) |
home-environment: run file collision check in function
Diffstat (limited to 'modules/home-environment.nix')
-rw-r--r-- | modules/home-environment.nix | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/modules/home-environment.nix b/modules/home-environment.nix index 3b62b77f4e5..e58f9324198 100644 --- a/modules/home-environment.nix +++ b/modules/home-environment.nix @@ -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 '' ); |