From f85b574a5d84d6d49805309fc27bac659d8fccb1 Mon Sep 17 00:00:00 2001 From: Zynh Ludwig Date: Thu, 1 Aug 2024 02:59:26 -0700 Subject: [PATCH] bash file counting --- service.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/service.nix b/service.nix index 480c5ca..e8a05ec 100644 --- a/service.nix +++ b/service.nix @@ -25,7 +25,9 @@ in target=''${args[1]} if [ -d "''$target" ]; then - if ${pkgs.findutils}/bin/find "''$target" -maxdepth 0 -empty; then + files=(''$target"/*") + + if [ ''$(''$files[@]) -gt 0 ]; then echo "~ Found Files at ''$target ~" else echo "~ No Files in ''$target ~"