From 5b27920e2e11b03b96d3cdbd9b3443b1f11da773 Mon Sep 17 00:00:00 2001 From: Tu Dinh Date: Fri, 10 Jan 2025 17:54:19 +0100 Subject: [PATCH] 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 --- scripts/set_xva_bridge.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/set_xva_bridge.sh b/scripts/set_xva_bridge.sh index 7f3e97c6..9f67161e 100755 --- a/scripts/set_xva_bridge.sh +++ b/scripts/set_xva_bridge.sh @@ -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