Last active
August 29, 2015 14:02
-
-
Save jepio/27c1d91f6430431cef6a to your computer and use it in GitHub Desktop.
A function to discover why a package is masked in portage on gentoo. Source: http://blogs.gentoo.org/news/2014/06/02/gentoo-monthly-newsletter-may-2014/#Tip_of_the_month
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
whymask() { | |
find /usr/portage/profiles/ -name '*.mask' -exec \ | |
awk -vRS= "/${*/\//.}/ { | |
print \" \" FILENAME \":\", \"\n\" \"\n\" \$0 \"\n\" | |
}" {} + | less | |
} | |
whymask $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Incase I forget, the correct way to define a bash inline function is:
The space after '{' is important.