Ignore:
Timestamp:
03/19/2006 11:14:42 AM (19 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
experimental
Children:
ad71d98
Parents:
c0cbd50
Message:

Simplified unpack code due tar >= 1.5 prerequisite.
If both bz2 and gz formats of the same package are found in the sources dir, only the more recent one is unpacked.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/common-functions

    rc0cbd50 rc3c4e1d  
    229229
    230230
     231#----------------------------------#
     232wrt_unpack2() {                    #
     233#----------------------------------#
     234  local FILE=$1
     235(
     236cat  << EOF
     237        @\$(call unpack2,$FILE)
     238        @ROOT=\`head -n1 /tmp/unpacked | sed 's@^./@@;s@/.*@@'\` && \\
     239        echo "export PKGDIR=\$(SRC)/\$\$ROOT" > envars
     240EOF
     241) >> $MKFILE.tmp
     242}
     243
     244
    231245#=============================#
    232246wrt_unpack3() {               # Unpack and set 'ROOT' var
     
    236250cat  << EOF
    237251        @\$(call unpack3,$FILE)
    238         @ROOT=\`head -n1 /tmp/unpacked | sed 's@^./@@;s@/.*@@'\` && \\
    239         echo "export PKGDIR=\$(MOUNT_PT)\$(SRC)/\$\$ROOT" > envars && \\
    240         chown -R lfs \$(MOUNT_PT)\$(SRC)/\$\$ROOT
    241 EOF
    242 ) >> $MKFILE.tmp
    243 }
    244 
    245 
    246 #----------------------------------#
    247 wrt_unpack2() {                    #
    248 #----------------------------------#
    249   local FILE=$1
    250 (
    251 cat  << EOF
    252         @\$(call unpack2,$FILE)
    253         @ROOT=\`head -n1 /tmp/unpacked | sed 's@^./@@;s@/.*@@'\` && \\
    254         echo "export PKGDIR=\$(SRC)/\$\$ROOT" > envars
    255 EOF
    256 ) >> $MKFILE.tmp
    257 }
    258 
    259 
    260 #=============================#
    261 wrt_unpack4() {               # Unpack and set 'ROOT' var
    262 #=============================#
    263   local FILE=$1
    264 (
    265 cat  << EOF
    266         @\$(call unpack4,$FILE)
    267252        @ROOT=\`head -n1 /tmp/unpacked | sed 's@^./@@;s@/.*@@'\` && \\
    268253        echo "export PKGDIR=\$(SRC)/\$\$ROOT" > envars
Note: See TracChangeset for help on using the changeset viewer.