From 298813ffca500f3922e8997162dbc14715feec0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konrad=20Gr=C3=A4fe?= Date: Thu, 11 Jul 2019 21:46:58 +0200 Subject: [PATCH 1/2] extract: Error out when format is unknown MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Konrad Gräfe --- pidgin-windev.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pidgin-windev.sh b/pidgin-windev.sh index b551544..f203f24 100644 --- a/pidgin-windev.sh +++ b/pidgin-windev.sh @@ -124,7 +124,8 @@ extract() { bzip2) tar -xjf "$compressed" --directory "$directory" "${files[@]}" ;; gzip) tar -xzf "$compressed" --directory "$directory" ;; zip) unzip -qo${files:+j} "$compressed" "${files[@]}" -d "$directory" ;; - esac || exit + *) oops "Failed extracting $compressed";; + esac } install() { From 78cf3a3c5e29045acd5ddf15a2c2945d44620e69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konrad=20Gr=C3=A4fe?= Date: Thu, 11 Jul 2019 21:46:18 +0200 Subject: [PATCH 2/2] extract: Add support for xz format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Konrad Gräfe --- pidgin-windev.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/pidgin-windev.sh b/pidgin-windev.sh index f203f24..aca6066 100644 --- a/pidgin-windev.sh +++ b/pidgin-windev.sh @@ -123,6 +123,7 @@ extract() { lzma) tar --lzma -xf "$compressed" --directory "$directory" ;; bzip2) tar -xjf "$compressed" --directory "$directory" "${files[@]}" ;; gzip) tar -xzf "$compressed" --directory "$directory" ;; + xz) tar -xJf "$compressed" --directory "$directory" ;; zip) unzip -qo${files:+j} "$compressed" "${files[@]}" -d "$directory" ;; *) oops "Failed extracting $compressed";; esac