{"id":3,"date":"2005-06-09T21:36:18","date_gmt":"2005-03-17T17:04:40","guid":{"rendered":""},"modified":"2005-06-09T21:36:18","modified_gmt":"2005-06-09T21:36:18","slug":"edeps","status":"publish","type":"post","link":"https:\/\/blogs.gentoo.org\/ferdy\/2005\/06\/09\/edeps\/","title":{"rendered":"edeps"},"content":{"rendered":"<p>Hi !<\/p>\n<p>I&#8217;ve been using part of the <a href=\"http:\/\/dev.gentoo.org\/~ciaranm\">ciaranm<\/a>&#8216;s bashrc (most of the Gentoo-related functions) and though it&#8217;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:<\/p>\n<pre>edeps() { \r\n    local FILES e\r\n    \r\n    if [ ! -z \"${1}\" ] ; then\r\n        FILES=$(equery which ${1})\r\n    else\r\n        FILES=$(ls *.ebuild)\r\n    fi  \r\n    \r\n    for e in ${FILES};\r\n    do\r\n        echo -ne \"\\033[01;32m * \\033[00m\"\r\n        echo -n \"Depend atoms on: \"\r\n        echo -e \"\\033[01;38m${e##*\/}\\033[00m\"\r\n        echo\r\n        sed -ne '\/^[RP]\\?DEPEND=\\\"[^\\\"]*$\/,\/^.*\\\" *$\/p' \\\r\n            -e '\/^[RP]\\?DEPEND=\\\"[^\\\"]*\\\"$\/p' ${e}\r\n        echo\r\n    done\r\n}<\/pre>\n<p>PD: BTW this is my very first post on the Gentoo Planet. I hope you&#8217;ll forgive my language mistakes since english is not my mother tongue. (I&#8217;m spanish).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi ! I&#8217;ve been using part of the ciaranm&#8216;s bashrc (most of the Gentoo-related functions) and though it&#8217;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 [ ! &hellip; <a href=\"https:\/\/blogs.gentoo.org\/ferdy\/2005\/06\/09\/edeps\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">edeps<\/span><\/a><\/p>\n","protected":false},"author":14,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/blogs.gentoo.org\/ferdy\/wp-json\/wp\/v2\/posts\/3"}],"collection":[{"href":"https:\/\/blogs.gentoo.org\/ferdy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.gentoo.org\/ferdy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ferdy\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ferdy\/wp-json\/wp\/v2\/comments?post=3"}],"version-history":[{"count":0,"href":"https:\/\/blogs.gentoo.org\/ferdy\/wp-json\/wp\/v2\/posts\/3\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.gentoo.org\/ferdy\/wp-json\/wp\/v2\/media?parent=3"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ferdy\/wp-json\/wp\/v2\/categories?post=3"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ferdy\/wp-json\/wp\/v2\/tags?post=3"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}