local pkg=$(echo ${1} | cut -d/ -f2)
declare append
for portdir in ${ALL_PORTDIRS[@]}; do
- if [[ $portdir == $PORTDIR ]]; then
- overlay=""
+ if [[ -s $(dirname ${portdir}/repo_name) ]]; then
+ overlay="$(cat "${portdir}/profiles/repo_name")"
else
- if [[ -s $(dirname ${portdir}/repo_name) ]]; then
- overlay="$(cat "${portdir}/profiles/repo_name")"
- else
- # XXX: May be better to use full path
- overlay="$(basename "${portdir}")"
- fi
+ # XXX: May be better to use full path
+ overlay="$(basename "${portdir}")"
fi
# Open the ebuild file and retrieve defined USE flags
[[ ! -d "$portdir/${1}" ]] && continue