diff options
author | Mike Frysinger <vapier@gentoo.org> | 2007-03-17 02:08:23 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2007-03-17 02:08:23 +0000 |
commit | 962b3142f6aea84fa7f87277763567cfbbe264e1 (patch) | |
tree | 1ca7b995aba51ed5497af6a72c3d5940c22266c1 /bin/ecompress | |
parent | e4f268b67960ff7326d69fe150cc648c2593e0ab (diff) | |
download | portage-962b3142f6aea84fa7f87277763567cfbbe264e1.tar.gz portage-962b3142f6aea84fa7f87277763567cfbbe264e1.tar.bz2 portage-962b3142f6aea84fa7f87277763567cfbbe264e1.zip |
redo compression so that it is queued up in src_install and then dequeued post src_install
svn path=/main/trunk/; revision=6220
Diffstat (limited to 'bin/ecompress')
-rwxr-xr-x | bin/ecompress | 19 |
1 files changed, 19 insertions, 0 deletions
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 |