update_ebuilds: allow underscore, needed for app-misc/c_rehash

This commit is contained in:
Nick Owens 2015-12-03 14:03:34 -08:00
parent dca121d83f
commit 95fba29797

View File

@ -48,7 +48,7 @@ cd "$FLAGS_portage_stable"
for pkg in "$@"; do
# Only allow packages, not categories or the whole tree
if [[ ! "$pkg" =~ ^[a-z0-9-][a-z0-9-]*\/[a-zA-Z0-9-][a-zA-Z0-9-]*$ ]] &&
if [[ ! "$pkg" =~ ^[a-z0-9-][a-z0-9-]*\/[a-zA-Z0-9-][a-zA-Z0-9_-]*$ ]] &&
[[ ! "$pkg" =~ ^(eclass|licenses|profiles|scripts) ]]; then
die "Invalid name $pkg, must be category/package or special dir."
fi