Lines 20-32
Link Here
|
20 |
# |
20 |
# |
21 |
_portdir() |
21 |
_portdir() |
22 |
{ |
22 |
{ |
23 |
sed -n -e '/^PORTDIR=/ { s/^[^=]\+="\?\([^"]\+\|\S\+\).*/\1/p ; q }' \ |
23 |
local grab='${PORTDIR}' |
24 |
/etc/make.{conf,globals} 2>/dev/null |
24 |
[[ $1 == '-o' ]] && grab="${grab} \${PORTDIR_OVERLAY}" |
25 |
|
25 |
# use the source, Luke -- offers flexibility in make.conf |
26 |
if [[ $1 == '-o' ]] ; then |
26 |
eval "source /etc/make.globals |
27 |
sed -n -e '/^PORTDIR_OVERLAY=/ { s/^[^=]\+="\?\([^"]\+\|\S\+\).*/\1/p ; q }' \ |
27 |
source /etc/make.conf |
28 |
/etc/make.conf 2>/dev/null |
28 |
echo ${grab}" |
29 |
fi |
|
|
30 |
} |
29 |
} |
31 |
|
30 |
|
32 |
# like _pkgname but completes on package names only (no category) |
31 |
# like _pkgname but completes on package names only (no category) |