28 lines
664 B
Bash
Executable file
28 lines
664 B
Bash
Executable file
#!/usr/bin/env bash
|
|
PKGDIR="/usr/portage/packages"
|
|
|
|
for atom in $(emerge -uDN --pretend --quiet world | grep ^'\[ebuild' | sed -e 's/.* \b\([a-z0-9\-]\+\/[\_A-Za-z\.0-9\-]\+\)\b.*/\1/g');
|
|
do
|
|
if [[ ! -f "$PKGDIR/$atom.tbz2" ]]
|
|
then
|
|
#build one by one. This takes more time, however it builds all possible packages.
|
|
echo "building $atom "
|
|
emerge --quiet --keep-going -B "=${atom}" >> /dev/null
|
|
if [[ $? ]]
|
|
then
|
|
SUCCESS="$atom $SUCCESS"
|
|
else
|
|
FAILURE="$atom $FAILURE"
|
|
fi
|
|
fi
|
|
done
|
|
|
|
if [[ -n "${SUCCESS}" ]]
|
|
then
|
|
echo "Successfully build: ${SUCCESS}"
|
|
fi
|
|
|
|
if [[ -n "${FAILURE}" ]]
|
|
then
|
|
echo "Build Failures: ${FAILURE}"
|
|
fi
|