Compare commits

...

1 Commits

Author SHA1 Message Date
b951534f37 tools.func: better handling when unpacking tarfiles in prebuild mode 2025-07-07 10:04:09 +02:00

View File

@ -941,7 +941,11 @@ function fetch_and_deploy_gh_release() {
fi
$STD unzip "$tmpdir/$filename" -d "$target"
elif [[ "$filename" == *.tar.* ]]; then
tar --strip-components=1 -xf "$tmpdir/$filename" -C "$target"
if tar -tf "$tmpdir/$filename" | grep -qE '^([^/]+/){2}'; then
tar --strip-components=1 -xf "$tmpdir/$filename" -C "$target"
else
tar -xf "$tmpdir/$filename" -C "$target"
fi
else
msg_error "Unsupported archive format: $filename"
rm -rf "$tmpdir"