Lines Matching refs:ARCHIVE
723 # Unpack a given archive
725 # $1: archive file path
730 local ARCHIVE="$1"
741 case "$ARCHIVE" in
743 (cd $DIR && run unzip $ZIPFLAGS "$ARCHIVE")
746 run tar $TARFLAGS "$ARCHIVE" -C $DIR
749 run tar z$TARFLAGS "$ARCHIVE" -C $DIR
754 run tar --use-compress-prog=pbzip2 -$TARFLAGS "$ARCHIVE" -C $DIR
756 run tar j$TARFLAGS "$ARCHIVE" -C $DIR
762 panic "Cannot unpack archive with unknown extension: $ARCHIVE"
767 # Pack a given archive
769 # $1: archive file path (including extension)
770 # $2: source directory for archive content
774 local ARCHIVE="$1"
784 if [ "`basename $ARCHIVE`" = "$ARCHIVE" ] ; then
785 ARCHIVE="`pwd`/$ARCHIVE"
787 mkdir -p `dirname $ARCHIVE`
796 # this can save up to 7 MB in the size of the final archive
798 case "$ARCHIVE" in
800 (cd $SRCDIR && run zip $ZIPFLAGS "$ARCHIVE" $SRCFILES)
803 (cd $SRCDIR && run tar $TARFLAGS "$ARCHIVE" $SRCFILES)
806 (cd $SRCDIR && run tar z$TARFLAGS "$ARCHIVE" $SRCFILES)
811 (cd $SRCDIR && run tar --use-compress-prog=pbzip2 -$TARFLAGS "$ARCHIVE" $SRCFILES)
813 (cd $SRCDIR && run tar j$TARFLAGS "$ARCHIVE" $SRCFILES)
817 panic "Unsupported archive format: $ARCHIVE"