Skip to content

Commit 360356c

Browse files
SuperKaliigorpecovnik
authored andcommitted
json-generation: recognise .tar.(xz|gz|zst) in extract_file_extension
Currently the function falls through to the generic "${n##*.}" fallback for tar-based image archives, returning just "xz" (or "gz"/"zst") as the file_extension. Downstream consumers — notably armbian-router's map loader — only add entries whose extension ends with img.xz or a registered specialExtension, so all 3 Arduino UNO Q community images distributed as .tar.xz silently disappear from the redirect map and return 404. Add explicit cases for .tar.xz / .tar.gz / .tar.zst so the generator emits the full compound extension. Refs: #277 Refs: armbian/armbian-router#39
1 parent 88dab0d commit 360356c

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

scripts/generate-armbian-images-json.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,20 @@ extract_file_extension() {
467467
return
468468
fi
469469

470+
# tar archives (e.g. Arduino UNO Q images): *.tar.xz / *.tar.gz / *.tar.zst
471+
if [[ "$n" == *.tar.xz ]]; then
472+
echo "tar.xz"
473+
return
474+
fi
475+
if [[ "$n" == *.tar.gz ]]; then
476+
echo "tar.gz"
477+
return
478+
fi
479+
if [[ "$n" == *.tar.zst ]]; then
480+
echo "tar.zst"
481+
return
482+
fi
483+
470484
# fallback
471485
echo "${n##*.}"
472486
}

0 commit comments

Comments
 (0)