File tree Expand file tree Collapse file tree 1 file changed +18
-8
lines changed Expand file tree Collapse file tree 1 file changed +18
-8
lines changed Original file line number Diff line number Diff line change 5
5
# shellcheck source=scripts/logger.sh
6
6
source " $( dirname " $0 " ) /logger.sh"
7
7
8
+
8
9
check_geometry () (
9
10
error=0
10
11
file=" $1 "
11
12
device=" $2 "
12
13
13
14
case " $device " in
14
- " nanos" )
15
+ nanos)
15
16
geometry=" 16x16"
16
17
;;
17
- " nanox" )
18
- geometry=" 14x14"
19
- ;;
20
- " nanos2" )
18
+ nanox | nanos2)
21
19
geometry=" 14x14"
22
20
;;
23
- " stax" )
21
+ stax | apex | apex_m | apex_p )
24
22
geometry=" 32x32"
25
23
;;
26
- " flex" )
24
+ flex)
27
25
geometry=" 40x40"
28
26
;;
29
27
* )
@@ -202,14 +200,26 @@ main() (
202
200
for icon_and_device in " ${! icons_and_devices[@]} " ; do
203
201
icon=" $( echo " $icon_and_device " | cut -d' ;' -f1) "
204
202
device=" $( echo " $icon_and_device " | cut -d' ;' -f2) "
205
- check_icon " $repo_name " " $device " " $repo /$build_directory /$icon " || error=1
203
+ img_file=" $repo /$build_directory /$icon "
204
+ if ! [[ -f " $img_file " ]]; then
205
+ log_error " Icon file '$img_file ' Doesn't exist!"
206
+ error=1
207
+ continue
208
+ fi
209
+ check_icon " $repo_name " " $device " " $img_file " || error=1
206
210
done
207
211
208
212
# As we scanned for all devices and all variants, we can have a lot of duplicates for glyphs. Filter out duplicates and empty lines
209
213
all_glyph_files_no_duplicates=" $( echo " $all_glyph_files " | tr ' ' ' \n' | sort -u | grep .) "
210
214
while IFS= read -r file; do
211
215
# Skip SDK glyphs
212
216
if [[ " $file " != " /opt/" * " -secure-sdk/" * ]]; then
217
+ img_file=" $repo /$build_directory /$file "
218
+ if ! [[ -f " $img_file " ]]; then
219
+ log_error " Glyph file '$img_file ' Doesn't exist!"
220
+ error=1
221
+ continue
222
+ fi
213
223
check_glyph " $repo /$build_directory /$file " || error=1
214
224
fi
215
225
done < <( echo " $all_glyph_files_no_duplicates " )
You can’t perform that action at this time.
0 commit comments