Get PORTAGE_TMPDIR from "emerge --info"

This commit is contained in:
Kolan Sh 2018-05-29 18:46:34 +03:00
parent 6a840c1c15
commit 1adec671b6
1 changed files with 1 additions and 0 deletions

View File

@ -477,6 +477,7 @@ if [ $STAGE_CNT -eq $STAGE ]; then
[ 0 -ne $? ] && echo "Stage $STAGE: eclean -d distfiles failed ;-( =======" && exit $STAGE
fi
fi
PORTAGE_TMPDIR=$(emerge --info --color=n | grep --color=never PORTAGE_TMPDIR | cut -d\" -f2)
[ -z "${PORTAGE_TMPDIR}" ] && PORTAGE_TMPDIR=/var/tmp
rm -rf "${PORTAGE_TMPDIR}"/portage/*
[ 0 -ne $? ] && echo "Stage $STAGE: rm -rf "${PORTAGE_TMPDIR}"/portage/* failed ;-( =======" && exit $STAGE