We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8e59bb commit f7a881eCopy full SHA for f7a881e
1 file changed
scripts/ci/emscripten/examples_to_build.sh
@@ -69,10 +69,18 @@ for folder in "${folders[@]}"; do
69
cp -r $thumb_gif "$out_folder/$parent_folder_name/$folder_name/"
70
outThumbs+="$thumb_gif,"
71
elif [ -e "$thumb_jpg" ]; then
72
- cp -r $thumb_jpg "$out_folder/$parent_folder_name/$folder_name/"
+ cp -r $thumb_jpg "$out_folder/$parent_folder_name/$folder_name/"
73
outThumbs+="$thumb_jpg,"
74
else
75
- outThumbs+="of.png,"
+ #try any image file
76
+ first_file=$(find . -maxdepth 1 \( -name "*.gif" -o -name "*.png" -o -name "*.jpg" \) -print -quit)
77
+ # Check if a file was found
78
+ if [ -n "$first_file" ]; then
79
+ outThumbs+="$first_file,"
80
+ else
81
+ #default file
82
+ outThumbs+="of.png,"
83
+ fi
84
fi
85
86
outPaths+="$parent_folder_name/$folder_name,"
0 commit comments