examples: Support mac os to execute all

This commit is contained in:
Jinny You 2023-11-01 17:25:20 +09:00 committed by Hermet Park
parent a607bf586b
commit 82bd8a3f8b

View file

@ -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