From 093020bfc900ac1d1415a1b558e7dfe144c16c72 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 31 May 2014 07:55:46 +0200 Subject: [PATCH] hooks/patches: simplify. --- common/hooks/post-extract/00-patches.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/common/hooks/post-extract/00-patches.sh b/common/hooks/post-extract/00-patches.sh index a6cc4afe16b..f512640aeae 100644 --- a/common/hooks/post-extract/00-patches.sh +++ b/common/hooks/post-extract/00-patches.sh @@ -13,16 +13,10 @@ _process_patch() { cp -f $i $wrksrc # Try to guess if its a compressed patch. - if [[ $f =~ .diff.*.gz ]]; then + if [[ $f =~ .gz$ ]]; then gunzip $wrksrc/${_patch} _patch=${_patch%%.gz} - elif [[ $f =~ .patch.*.gz ]]; then - gunzip $wrksrc/${_patch} - _patch=${_patch%%.gz} - elif [[ $f =~ .diff.*.bz2 ]]; then - bunzip2 $wrksrc/${_patch} - _patch=${_patch%%.bz2} - elif [[ $f =~ .patch.*.bz2 ]]; then + elif [[ $f =~ .bz2$ ]]; then bunzip2 $wrksrc/${_patch} _patch=${_patch%%.bz2} elif [[ $f =~ .diff ]]; then