From 61cdb0e44b6cdd08c72d2252e1a8b32b6b86c39b Mon Sep 17 00:00:00 2001 From: Bruno21 Date: Mon, 9 Aug 2021 08:03:03 +0200 Subject: [PATCH] Bugfix find -maxdeph --- kymsu2.sh | 2 +- plugins.d/homebrew.sh | 2 +- plugins.d/pecl.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kymsu2.sh b/kymsu2.sh index 66453aa..ceceeee 100755 --- a/kymsu2.sh +++ b/kymsu2.sh @@ -31,7 +31,7 @@ cd "$SCRIPTS_DIR" # On boucle sur tous les fichiers du répertoire # (seuls les fichiers commençant par '_' ou '0' sont pris en compte) #for script in $(find . -name '[_0]*' -maxdepth 1 | sort); do -for script in $(find . ! -name _\*.sh -maxdepth 1 | sort); do +for script in $(find . -maxdepth 1 ! -name _\*.sh | sort); do # si le fichier est exécutable et n'est pas un dossier if [ -x "$SCRIPTS_DIR/$script" ] && [ -f "$SCRIPTS_DIR/$script" ]; then # on l’exécute ; le $@ permet de passer à chaque diff --git a/plugins.d/homebrew.sh b/plugins.d/homebrew.sh index f2bc07b..96257bd 100755 --- a/plugins.d/homebrew.sh +++ b/plugins.d/homebrew.sh @@ -449,7 +449,7 @@ dir=$(dirname $conf_apa) name=$(basename $conf_apa) notif1="$dir has been modified in the last 5 minutes" -test=$(find $dir -name "$name" -mmin -5 -maxdepth 1) +test=$(find $dir -maxdepth 1 -name "$name" -mmin -5) echo "$test" diff --git a/plugins.d/pecl.sh b/plugins.d/pecl.sh index 7674afd..6f058c6 100755 --- a/plugins.d/pecl.sh +++ b/plugins.d/pecl.sh @@ -189,7 +189,7 @@ if [ "$display_info" = true ]; then [ "$php_info" = true ] && echo -e "Opening PHP info in Safari..." && open "https://$host.local/info.php" fi -test=$(find "$dir" -name "$name" -mmin -5 -maxdepth 1) +test=$(find "$dir" -maxdepth 1 -name "$name" -mmin -5) if [ -n "$test" ]; then echo -e "${red}❗️ ️$notif2${reset}"