Hi !
I’ve been using part of the ciaranm‘s bashrc (most of the Gentoo-related functions) and though it’s great I thought that something was missing. I needed something to extrackt the depend atoms on a package. I played a bit with sed and finally wrote something useful:
edeps() { local FILES e if [ ! -z "${1}" ] ; then FILES=$(equery which ${1}) else FILES=$(ls *.ebuild) fi for e in ${FILES}; do echo -ne "\033[01;32m * \033[00m" echo -n "Depend atoms on: " echo -e "\033[01;38m${e##*/}\033[00m" echo sed -ne '/^[RP]\?DEPEND=\"[^\"]*$/,/^.*\" *$/p' \ -e '/^[RP]\?DEPEND=\"[^\"]*\"$/p' ${e} echo done }
PD: BTW this is my very first post on the Gentoo Planet. I hope you’ll forgive my language mistakes since english is not my mother tongue. (I’m spanish).