Make keepdir() compatible with subslots.
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Wed, 17 Oct 2012 22:41:38 +0000 (00:41 +0200)
committerArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Wed, 17 Oct 2012 22:41:38 +0000 (00:41 +0200)
bin/phase-helpers.sh

index 67d09a462a73980eb60b0bf22d7e4e8729d7658d..5055060f7f7911b4438bbc9e8d1dfc5fbbee356c 100644 (file)
@@ -150,7 +150,7 @@ keepdir() {
        fi
        if [ "$1" == "-R" ] || [ "$1" == "-r" ]; then
                shift
-               find "$@" -type d -printf "${ED}%p/.keep_${CATEGORY}_${PN}-${SLOT}\n" \
+               find "$@" -type d -printf "${ED}%p/.keep_${CATEGORY}_${PN}-${SLOT%/*}\n" \
                        | tr "\n" "\0" | \
                        while read -r -d $'\0' ; do
                                >> "$REPLY" || \
@@ -158,7 +158,7 @@ keepdir() {
                        done
        else
                for x in "$@"; do
-                       >> "${ED}${x}/.keep_${CATEGORY}_${PN}-${SLOT}" || \
+                       >> "${ED}${x}/.keep_${CATEGORY}_${PN}-${SLOT%/*}" || \
                                die "Failed to create .keep in ${ED}${x}"
                done
        fi