prepcompress: Use ED rather than D.
authorUlrich Mueller <ulm@gentoo.org>
Mon, 3 Jan 2011 11:57:50 +0000 (12:57 +0100)
committerFabian Groffen <grobian@gentoo.org>
Mon, 3 Jan 2011 19:35:31 +0000 (20:35 +0100)
bin/misc-functions.sh

index 125ebb48b4935f4a0b09f06727599748bf0c8359..8a97901873872648cf89e975abf63eac3cdeb7a5 100644 (file)
@@ -68,9 +68,9 @@ prepcompress() {
        local f g i real_f real_d
 
        # Canonicalize path names and check for their existence.
-       real_d=$(canonicalize "${D}")
+       real_d=$(canonicalize "${ED}")
        for (( i = 0; i < ${#PORTAGE_DOCOMPRESS[@]}; i++ )); do
-               real_f=$(canonicalize "${D}${PORTAGE_DOCOMPRESS[i]}")
+               real_f=$(canonicalize "${ED}${PORTAGE_DOCOMPRESS[i]}")
                f=${real_f#"${real_d}"}
                if [[ ${real_f} != "${f}" ]] && [[ -d ${real_f} || -f ${real_f} ]]
                then
@@ -81,7 +81,7 @@ prepcompress() {
                fi
        done
        for (( i = 0; i < ${#PORTAGE_DOCOMPRESS_SKIP[@]}; i++ )); do
-               real_f=$(canonicalize "${D}${PORTAGE_DOCOMPRESS_SKIP[i]}")
+               real_f=$(canonicalize "${ED}${PORTAGE_DOCOMPRESS_SKIP[i]}")
                f=${real_f#"${real_d}"}
                if [[ ${real_f} != "${f}" ]] && [[ -d ${real_f} || -f ${real_f} ]]
                then
@@ -130,7 +130,7 @@ prepcompress() {
 
        # Split the include list into directories and files
        for f in "${include[@]}"; do
-               if [[ -d ${D}${f} ]]; then
+               if [[ -d ${ED}${f} ]]; then
                        incl_d[${#incl_d[@]}]=${f}
                else
                        incl_f[${#incl_f[@]}]=${f}
@@ -140,7 +140,7 @@ prepcompress() {
        # Queue up for compression.
        # ecompress{,dir} doesn't like to be called with empty argument lists.
        [[ ${#incl_d[@]} -gt 0 ]] && ecompressdir --queue "${incl_d[@]}"
-       [[ ${#incl_f[@]} -gt 0 ]] && ecompress --queue "${incl_f[@]/#/${D}}"
+       [[ ${#incl_f[@]} -gt 0 ]] && ecompress --queue "${incl_f[@]/#/${ED}}"
        [[ ${#exclude[@]} -gt 0 ]] && ecompressdir --ignore "${exclude[@]}"
        return 0
 }