From 30e8e0a9a3b11e06f0aed76e25ae5fdd73f833de Mon Sep 17 00:00:00 2001 From: toonn Date: Thu, 31 Mar 2022 12:45:33 +0200 Subject: [PATCH] desktopToDarwinBundle: Change empty directory test `ls -1 "$iconsdir/"*` listed the source directory for me when the glob had no matches. Switching to `-A` circumvents this problem and has the added advantage that it cannot run into argument list length limits. --- pkgs/build-support/setup-hooks/desktop-to-darwin-bundle.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/setup-hooks/desktop-to-darwin-bundle.sh b/pkgs/build-support/setup-hooks/desktop-to-darwin-bundle.sh index 5bd71764c617..b1364db06107 100644 --- a/pkgs/build-support/setup-hooks/desktop-to-darwin-bundle.sh +++ b/pkgs/build-support/setup-hooks/desktop-to-darwin-bundle.sh @@ -163,7 +163,7 @@ convertIconTheme() { } iconsdir=$(getIcons "$sharePath" "apps/${iconName}" "$theme") - if [[ -n "$(ls -1 "$iconsdir/"*)" ]]; then + if [[ -n "$(ls -A1 "$iconsdir")" ]]; then icnsutil compose --toc "$out/${iconName}.icns" "$iconsdir/"* else echo "Warning: no icons were found. Creating an empty icon for ${iconName}.icns."