Skip to content

Commit

Permalink
set_xva_bridge: use file -b
Browse files Browse the repository at this point in the history
file -b avoids printing filename in file's output, which simplifies
filetype parsing a bit.

Signed-off-by: Tu Dinh <[email protected]>
  • Loading branch information
Tu Dinh committed Jan 10, 2025
1 parent f227499 commit 5b27920
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/set_xva_bridge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ else
fi

# we detect the compression method of the xva to uncompress it right
OLD_COMPRESSION=$(file "${XVA_NAME}" | cut -f 2 -d : | cut -f 2 -d " ")
OLD_COMPRESSION=$(file -b "${XVA_NAME}" | cut -f 1 -d " ")
if [ "${OLD_COMPRESSION}" != "Zstandard" ] && [ "${OLD_COMPRESSION}" != "gzip" ] && [ "${OLD_COMPRESSION}" != "tar" ]; then
echo "Error: unknown compression type detected for ${XVA_NAME}: ${OLD_COMPRESSION}"
exit 1
Expand Down

0 comments on commit 5b27920

Please sign in to comment.