mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-02-25 15:45:54 +00:00
Update tools.func
This commit is contained in:
@@ -931,7 +931,11 @@ function fetch_and_deploy_gh_release() {
|
|||||||
fi
|
fi
|
||||||
$STD unzip "$tmpdir/$filename" -d "$target"
|
$STD unzip "$tmpdir/$filename" -d "$target"
|
||||||
elif [[ "$filename" == *.tar.* ]]; then
|
elif [[ "$filename" == *.tar.* ]]; then
|
||||||
|
if tar -tf "$tmpdir/$filename" | grep -qE '^([^/]+/){2}'; then
|
||||||
tar --strip-components=1 -xf "$tmpdir/$filename" -C "$target"
|
tar --strip-components=1 -xf "$tmpdir/$filename" -C "$target"
|
||||||
|
else
|
||||||
|
tar -xf "$tmpdir/$filename" -C "$target"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
msg_error "Unsupported archive format: $filename"
|
msg_error "Unsupported archive format: $filename"
|
||||||
rm -rf "$tmpdir"
|
rm -rf "$tmpdir"
|
||||||
|
|||||||
Reference in New Issue
Block a user