#!/bin/bash if [ "$*" != "" ]; then installed_packages="$*" else installed_packages="$(eix --format '/') | sed -r 's/Found [0-9]+ matches//g" fi compil_list="" for package in $installed_packages; do installed_version="$(eix --format '' -e $package | sed -r 's/Found [0-9]+ matches//g')" for version in $installed_version; do echo "scanning /usr/portage/$package/*-$version'.ebuild" [ "$(grep emake /usr/portage/$package/*-$version'.ebuild')" != "" ] && compil_list="$compil_list $package" done done echo $compil_list