From 6a43f763433902911b227b483de3b4ac30f3e07b Mon Sep 17 00:00:00 2001 From: Unay Santisteban Date: Mon, 20 Jan 2025 20:16:03 +0100 Subject: [PATCH] fix: correct find -perm option for macos --- scripts/core/dot.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/core/dot.sh b/scripts/core/dot.sh index b1809ea4..5c02d122 100644 --- a/scripts/core/dot.sh +++ b/scripts/core/dot.sh @@ -25,8 +25,13 @@ dot::list_scripts() { } dot::list_scripts_path() { - dotly_contexts=$(find "$DOTLY_PATH/scripts" -maxdepth 2 -perm /+111 -type f | grep -v "$DOTLY_PATH/scripts/core") - dotfiles_contexts=$(find "$DOTFILES_PATH/scripts" -maxdepth 2 -perm /+111 -type f) + if platform::is_macos; then + dotly_contexts=$(find "$DOTLY_PATH/scripts" -maxdepth 2 -perm -111 -type f | grep -v "$DOTLY_PATH/scripts/core") + dotfiles_contexts=$(find "$DOTFILES_PATH/scripts" -maxdepth 2 -perm -111 -type f) + else + dotly_contexts=$(find "$DOTLY_PATH/scripts" -maxdepth 2 -perm /+111 -type f | grep -v "$DOTLY_PATH/scripts/core") + dotfiles_contexts=$(find "$DOTFILES_PATH/scripts" -maxdepth 2 -perm /+111 -type f) + fi printf "%s\n%s" "$dotly_contexts" "$dotfiles_contexts" | sort -u }