transcode : return error on file exitst.

This commit is contained in:
Dmitry Voronin 2023-11-28 15:34:56 +03:00
parent 3f13fb9206
commit 98919393c4

View file

@ -87,13 +87,13 @@ transcode()
_transcode_gz-xz() _transcode_gz-xz()
{ {
[[ -f "${2}" ]] && return 0 [[ -f "${2}" ]] && return 1
pv "${1}" | gzip -d | xz -9e > "${2}" pv "${1}" | gzip -d | xz -9e > "${2}"
} }
_transcode_xz-gz() _transcode_xz-gz()
{ {
[[ -f "${2}" ]] && return 0 [[ -f "${2}" ]] && return 1
pv "${1}" | xz -d | gzip -1 > "${2}" pv "${1}" | xz -d | gzip -1 > "${2}"
} }