mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-07-21 21:35:08 +02:00
tools.func: add support for extracting 7z archives (#15919)
This commit is contained in:
committed by
GitHub
parent
a61dc9c585
commit
5b4e526329
@@ -2587,6 +2587,16 @@ _deploy_unpacked_archive() {
|
||||
msg_error "Failed to extract TAR archive"
|
||||
return 251
|
||||
}
|
||||
elif [[ "$filename" == *.7z ]]; then
|
||||
if [[ -f /etc/alpine-release ]]; then
|
||||
ensure_dependencies 7zip
|
||||
else
|
||||
ensure_dependencies p7zip-full
|
||||
fi
|
||||
7z x -y -o"$workdir" "$archive" >/dev/null 2>&1 || {
|
||||
msg_error "Failed to extract 7z archive"
|
||||
return 251
|
||||
}
|
||||
else
|
||||
msg_error "Unsupported archive format: $filename"
|
||||
return 65
|
||||
|
||||
Reference in New Issue
Block a user