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/makefile-functions

    rc0cbd50 rc3c4e1d  
     1
     2# $Id$
     3
    14BOLD= "[0;1m"
    25RED= "[1;31m"
     
    1417
    1518define unpack
    16   @if [ -f $(MOUNT_PT)$(SRC)/$(1).bz2 ] ; then \
    17     cd $(MOUNT_PT)$(SRC) ; tar -xvjf $(1).bz2 > /tmp/unpacked ; \
    18   else \
    19     cd $(MOUNT_PT)$(SRC) ; tar -xvzf $(1).gz > /tmp/unpacked ; \
    20   fi ;
     19  @cd $(MOUNT_PT)$(SRC) && \
     20  tar -xvf `ls -t $(1) | head -n1` > /tmp/unpacked
    2121endef
    2222
    2323define unpack2
    24   @cd $(MOUNT_PT)$(SRC) ; /tools/bin/tar -xvf $(1) > /tmp/unpacked
     24  @cd $(MOUNT_PT)$(SRC) && \
     25  /tools/bin/tar -xvf `ls -t $(1) | head -n1` > /tmp/unpacked
    2526endef
    2627
    2728define unpack3
    28   @cd $(MOUNT_PT)$(SRC) ; tar -xvf $(1) > /tmp/unpacked
    29 endef
    30 
    31 define unpack4
    32   @cd $(SRC) ; tar -xvf $(1) > /tmp/unpacked
     29  @cd $(SRC) && \
     30  tar -xvf `ls -t $(1) | head -n1` > /tmp/unpacked
    3331endef
    3432
Note: See TracChangeset for help on using the changeset viewer.