From 45dfab5ef5560f7ee87922724cace38a6f4e5870 Mon Sep 17 00:00:00 2001 From: Jinny You Date: Wed, 1 Nov 2023 17:25:20 +0900 Subject: [PATCH] examples: Support mac os to execute all --- src/examples/all.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/examples/all.sh b/src/examples/all.sh index 8dc3254e..799609e5 100755 --- a/src/examples/all.sh +++ b/src/examples/all.sh @@ -4,7 +4,14 @@ GREEN='\033[32m' NC='\033[0m' INTERVAL=${1:-2} -EXAMPLES=`find . -executable -type f | sort | uniq` +CHECK_OS="`uname -s`" + +if [[ "$CHECK_OS" = "Darwin"* ]]; then + EXAMPLES=`find . -perm +111 -type f | sort | uniq` +else + EXAMPLES=`find . -executable -type f | sort | uniq` +fi + for EXAMPLE in $EXAMPLES do if [[ $EXAMPLE == *.sh ]]; then