diff options
Diffstat (limited to 'phpdoc.sh')
-rw-r--r-- | phpdoc.sh | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -3,6 +3,8 @@ set -u set -e +W3M="$(/usr/bin/which w3m)" || true + function usage { echo "Usage: $0 -f <function>" @@ -11,8 +13,14 @@ function usage function lookup_function { local name="$1" + local filename="function.$(echo "${name}" | /usr/bin/sed 's/_/-/g').html" + + if [ ! -n "${W3M}" ]; then + echo "w3m not found." + exit 1; + fi - echo "Looking up function $name" + ${W3M} "/usr/share/doc/php/php-chunked-xhtml/${filename}" } opt_f= |