Skip to content

Commit 5b27920

Browse files
committed
set_xva_bridge: use file -b
file -b avoids printing filename in file's output, which simplifies filetype parsing a bit. Signed-off-by: Tu Dinh <[email protected]>
1 parent f227499 commit 5b27920

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/set_xva_bridge.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ else
8787
fi
8888

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

0 commit comments

Comments
 (0)