Changeset 86ea442 in freewrt for scripts


Ignore:
Timestamp:
Jul 25, 2006, 3:19:50 PM (19 years ago)
Author:
Thorsten Glaser <tg@…>
Branches:
freewrt_1_0, freewrt_2_0
Children:
1b4c85d
Parents:
aee909e
Message:

allow patchpattern to be a braceexpand expression

git-svn-id: svn://www.freewrt.org/trunk/freewrt@408 afb5a338-a214-0410-bd46-81f09a774fd1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • scripts/patch-kernel.sh

    raee909e r86ea442  
    1919    exit 1
    2020fi
    21    
    22 for i in ${patchdir}/${patchpattern} ; do
     21
     22wd=$(pwd)
     23cd $patchdir
     24for i in ${patchpattern} ; do
     25    test -e "$i" || continue
     26    i=$patchdir/$i
     27    cd $wd
    2328    case "$i" in
    2429        *.gz)
    25         type="gzip"; uncomp="gunzip -dc"; ;; 
     30        type="gzip"; uncomp="gunzip -dc"; ;;
    2631        *.bz)
    27         type="bzip"; uncomp="bunzip -dc"; ;; 
     32        type="bzip"; uncomp="bunzip -dc"; ;;
    2833        *.bz2)
    29         type="bzip2"; uncomp="bunzip2 -dc"; ;; 
     34        type="bzip2"; uncomp="bunzip2 -dc"; ;;
    3035        *.zip)
    31         type="zip"; uncomp="unzip -d"; ;; 
     36        type="zip"; uncomp="unzip -d"; ;;
    3237        *.Z)
    33         type="compress"; uncomp="uncompress -c"; ;; 
     38        type="compress"; uncomp="uncompress -c"; ;;
    3439        *)
    35         type="plaintext"; uncomp="cat"; ;; 
     40        type="plaintext"; uncomp="cat"; ;;
    3641    esac
    37     [ -d "${i}" ] && echo "Ignoring subdirectory ${i}" && continue     
     42    [ -d "${i}" ] && echo "Ignoring subdirectory ${i}" && continue
    3843    echo ""
    39     echo "Applying ${i} using ${type}: " 
    40     ${uncomp} ${i} | patch -p1 -E -d ${targetdir} 
     44    echo "Applying ${i} using ${type}: "
     45    ${uncomp} ${i} | patch -p1 -E -d ${targetdir}
    4146    if [ $? != 0 ] ; then
    4247        echo "Patch failed!  Please fix $i!"
    4348        exit 1
    4449    fi
     50    cd $patchdir
    4551done
    4652
Note: See TracChangeset for help on using the changeset viewer.