Unverified Commit 8b61e35c authored by Castro-Fidel's avatar Castro-Fidel Committed by GitHub

Merge pull request #33 from zorn-v/patch-2

Do not overwrite symlinks on extract tars
parents 2ae02961 16fac7c1
...@@ -196,29 +196,29 @@ unpack_tar_zst () { ...@@ -196,29 +196,29 @@ unpack_tar_zst () {
set -o pipefail set -o pipefail
unset PW_ZSTD_PORT unset PW_ZSTD_PORT
if [[ `which zstd` ]] &>/dev/null ; then if [[ `which zstd` ]] &>/dev/null ; then
tar -I zstd -xvf "$1" -C "$2" | sszen tar -I zstd -xhvf "$1" -C "$2" | sszen
[ "${PIPESTATUS[0]}" != 0 ] && print_error "File $1 unpacking error." && return 1 || return 0 [ "${PIPESTATUS[0]}" != 0 ] && print_error "File $1 unpacking error." && return 1 || return 0
else else
env LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${PW_WINELIB}/portable/lib/lib64:${PW_WINELIB}/portable/lib/lib" tar -I "${PW_WINELIB}/portable/bin/zstd" -xvf "$1" -C "$2" | sszen env LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${PW_WINELIB}/portable/lib/lib64:${PW_WINELIB}/portable/lib/lib" tar -I "${PW_WINELIB}/portable/bin/zstd" -xhvf "$1" -C "$2" | sszen
[ "${PIPESTATUS[0]}" != 0 ] && print_error "File $1 unpacking error." && return 1 || return 0 [ "${PIPESTATUS[0]}" != 0 ] && print_error "File $1 unpacking error." && return 1 || return 0
fi fi
} }
unpack_tar_xz () { unpack_tar_xz () {
set -o pipefail set -o pipefail
tar -Jxvf "$1" -C "$2" | sszen tar -Jxhvf "$1" -C "$2" | sszen
[ "${PIPESTATUS[0]}" != 0 ] && print_error "File $1 unpacking error." && return 1 || return 0 [ "${PIPESTATUS[0]}" != 0 ] && print_error "File $1 unpacking error." && return 1 || return 0
} }
unpack_tar_gz () { unpack_tar_gz () {
set -o pipefail set -o pipefail
tar -xzvf "$1" -C "$2" | sszen tar -xhzvf "$1" -C "$2" | sszen
[ "${PIPESTATUS[0]}" != 0 ] && print_error "File $1 unpacking error." && return 1 || return 0 [ "${PIPESTATUS[0]}" != 0 ] && print_error "File $1 unpacking error." && return 1 || return 0
} }
unpack_tar () { unpack_tar () {
set -o pipefail set -o pipefail
tar -xvf "$1" -C "$2" | sszen tar -xhvf "$1" -C "$2" | sszen
[ "${PIPESTATUS[0]}" != 0 ] && print_error "File $1 unpacking error." && return 1 || return 0 [ "${PIPESTATUS[0]}" != 0 ] && print_error "File $1 unpacking error." && return 1 || return 0
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment