hooks/patches: fix parsing .{diff,patch} name

This commit is contained in:
Alessio Sergi 2014-05-13 16:31:00 +02:00
parent 59d5e80f48
commit 9937be2068
1 changed files with 4 additions and 4 deletions

View File

@ -13,16 +13,16 @@ _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 =~ .diff.*.gz ]]; then
gunzip $wrksrc/${_patch} gunzip $wrksrc/${_patch}
_patch=${_patch%%.gz} _patch=${_patch%%.gz}
elif [[ $f =~ .patch*.gz ]]; then elif [[ $f =~ .patch.*.gz ]]; then
gunzip $wrksrc/${_patch} gunzip $wrksrc/${_patch}
_patch=${_patch%%.gz} _patch=${_patch%%.gz}
elif [[ $f =~ .diff*.bz2 ]]; then elif [[ $f =~ .diff.*.bz2 ]]; then
bunzip2 $wrksrc/${_patch} bunzip2 $wrksrc/${_patch}
_patch=${_patch%%.bz2} _patch=${_patch%%.bz2}
elif [[ $f =~ .patch*.bz2 ]]; then 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