From c3d64c3c317689ee9e2b394b7c409641aae4cfca Mon Sep 17 00:00:00 2001 From: Zynh Ludwig Date: Thu, 1 Aug 2024 03:38:03 -0700 Subject: [PATCH] find again --- service.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/service.nix b/service.nix index 036ab0d..35dbaf2 100644 --- a/service.nix +++ b/service.nix @@ -26,9 +26,7 @@ in target=''${args[1]} if [ -d "$target" ]; then - files=(''${target}/*) - - if [[ $(#$files[@]) -gt 0 ]]; then + if [[ $(${pkgs.findutils}/bin/find /some/dir/ -maxdepth 0 -empty) -gt 0 ]]; then echo "~ Found Files at $target ~" else echo "~ No Files in $target ~"