hooks/patches: simplify.

This commit is contained in:
Juan RP 2014-05-31 07:55:46 +02:00
parent 605ecb6a4a
commit 093020bfc9

View File

@ -13,16 +13,10 @@ _process_patch() {
cp -f $i $wrksrc cp -f $i $wrksrc
# Try to guess if its a compressed patch. # Try to guess if its a compressed patch.
if [[ $f =~ .diff.*.gz ]]; then if [[ $f =~ .gz$ ]]; then
gunzip $wrksrc/${_patch} gunzip $wrksrc/${_patch}
_patch=${_patch%%.gz} _patch=${_patch%%.gz}
elif [[ $f =~ .patch.*.gz ]]; then elif [[ $f =~ .bz2$ ]]; then
gunzip $wrksrc/${_patch}
_patch=${_patch%%.gz}
elif [[ $f =~ .diff.*.bz2 ]]; then
bunzip2 $wrksrc/${_patch}
_patch=${_patch%%.bz2}
elif [[ $f =~ .patch.*.bz2 ]]; then
bunzip2 $wrksrc/${_patch} bunzip2 $wrksrc/${_patch}
_patch=${_patch%%.bz2} _patch=${_patch%%.bz2}
elif [[ $f =~ .diff ]]; then elif [[ $f =~ .diff ]]; then