Use the -q flag when calling port

The -q flag suppresses any output other than port names, eliminating the need to
further modify output.
This commit is contained in:
Aljaž "g5pw" Srebrnič 2014-02-19 15:26:52 +01:00
parent 77df22a969
commit 04e2e85de8
1 changed files with 9 additions and 11 deletions

View File

@ -135,8 +135,14 @@ _port() {
'-y[Perform a dry run.]' \
'-t[Enable trace mode debug facilities on platforms that support it (Mac OS X).]' \
"1:Port actions:(($actions))" \
'*:extra:_port_dispatch' \
'*:extra:->extra' \
&& return 0
case "$state" in
extra)
_port_dispatch
;;
esac
}
_port_dispatch() {
@ -219,16 +225,8 @@ _port_select() {
}
_port_caching_policy() {
local reg_time comp_time check_file
case "${1##*/}" in
PORT_INSTALLED_PACKAGES)
check_file=$port_prefix/var/macports/registry/registry.db
;;
PORT_AVAILABLE_PACKAGES)
check_file=${$(port dir MacPorts)%/*/*}/PortIndex
;;
esac
reg_time=$(stat -c '%Z' $check_file)
local reg_time comp_time
reg_time=$(stat -c '%Z' $port_prefix/var/macports/registry/registry.db)
comp_time=$(stat -c '%Z' $1)
return $(( reg_time < comp_time ))
}