From 962b3142f6aea84fa7f87277763567cfbbe264e1 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 17 Mar 2007 02:08:23 +0000 Subject: redo compression so that it is queued up in src_install and then dequeued post src_install svn path=/main/trunk/; revision=6220 --- bin/ecompress | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'bin/ecompress') diff --git a/bin/ecompress b/bin/ecompress index 7e51e3c44..de01cfdec 100755 --- a/bin/ecompress +++ b/bin/ecompress @@ -22,6 +22,8 @@ fi case $1 in --suffix) + [[ -n $2 ]] && vecho "${0##*/}: --suffix takes no additional arguments" 1>&2 + set -e tmpdir="${T}"/.ecompress$$.${RANDOM} mkdir "${tmpdir}" @@ -38,8 +40,25 @@ case $1 in echo "${suffix}" ;; --bin) + [[ -n $2 ]] && vecho "${0##*/}: --bin takes no additional arguments" 1>&2 + echo "${PORTAGE_COMPRESS} ${PORTAGE_COMPRESS_FLAGS}" ;; + --queue) + shift + exec touch "${@/%/.ecompress.file}" + ;; + --dequeue) + [[ -n $2 ]] && vecho "${0##*/}: --dequeue takes no additional arguments" 1>&2 + find "${D}" -name '*.ecompress.file' -print0 \ + | sed -e 's:\.ecompress\.file::g' \ + | ${XARGS} -0 ecompress + find "${D}" -name '*.ecompress.file' -print0 | ${XARGS} -0 rm -f + ;; + --*) + vecho "${0##*/}: unknown arguments '$*'" 1>&2 + exit 1 + ;; *) # If a compressed version of the file already exists, simply # delete it so that the compressor doesn't whine (bzip2 will -- cgit v1.2.3-1-g7c22