From c94eaa0e6c2cba37e38ff5e137d87b97d67b79b9 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sat, 27 Apr 2019 13:48:57 +0200 Subject: [PATCH] files: replace unnecessary use of xargs --- modules/files.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/files.nix b/modules/files.nix index 2e1171847..46e796ed1 100644 --- a/modules/files.nix +++ b/modules/files.nix @@ -74,8 +74,8 @@ in function checkNewGenCollision() { local newGenFiles newGenFiles="$(readlink -e "$newGenPath/home-files")" - find "$newGenFiles" -type f -print0 -or -type l -print0 \ - | xargs -0 bash ${check} "$newGenFiles" + find "$newGenFiles" -type f -or -type l \ + -exec bash ${check} "$newGenFiles" {} + } checkNewGenCollision || exit 1 @@ -155,8 +155,8 @@ in local newGenFiles newGenFiles="$(readlink -e "$newGenPath/home-files")" - find "$newGenFiles" -type f -print0 -or -type l -print0 \ - | xargs -0 bash ${link} "$newGenFiles" + find "$newGenFiles" -type f -or -type l \ + -exec bash ${link} "$newGenFiles" {} + } function cleanOldGen() {