# if the exit status from the last emerge command is not 0 check if there are packages to unmask
while [ $STATUS != 0 ]; do
# parse emerge output for keyworded dependencies
DEPEND=`emerge -pv $@ | grep "All ebuilds that could satisfy" | grep -o '".*"' | sed -e 's/\"//g'`

# if depend is empty, then we couldn't find any dependency
if [ "$DEPEND" == "" ]; then
printf "\n$RED sorry, it seems like there is some problem, please try running 'emerge $@' by hand.\n"
exit
fi

# if depend is equal to last_dependency, then the keyword we have set doesn't work
if [ "$LAST_DEPENDENCY" == "$DEPEND" ]; then
printf "\n$RED sorry, it seems like the package has already been keyworded.\n"
exit
fi

# confirm if keyword should be set
printf "\n"
printf "$ASTERISK it seems like $GREEN$DEPEND$LIGHT_GRAY is masked by keyword. set keyword? (y/n) "

or... emerge autounmask_________________the table is made from wood. forget what you learnt, the table is made from carbon. forget what you learnt, the table is made from protons. forget what you learnt, the table is made from quarks. forget what you learnt, the table is good for shagging on