Skip to content

Commit

Permalink
Merge pull request #168 from hypriot/case-insensitive-xz
Browse files Browse the repository at this point in the history
Make xz compression check case insensitive
  • Loading branch information
StefanScherer authored Mar 3, 2020
2 parents 91311c5 + 41e4e5a commit 29f1779
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flash
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ if [[ -z $CONFIGURE_ONLY ]] ; then
echo "Use ${image}"
fi

if [[ "$(file "${image}")" == *"xz compressed data"* ]]; then
if [[ "$(file "${image}" | tr '[:upper:]' '[:lower:]' )" == *"xz compressed data"* ]]; then
command -v xz 2>/dev/null || error "Error: unzip not found. Aborting" 1
echo "Uncompressing ${image} ..."
xz -d "${image}" -c >/tmp/image.img
Expand Down

0 comments on commit 29f1779

Please sign in to comment.