Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #14 from ab/which-fix

Which(1) already checks if file is executable.
  • Loading branch information...
commit a9694b20a04963e43bf68d4d206a097d431b9c99 2 parents 749c362 + 0b31cb4
avleen authored September 16, 2012

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  bashttpd.sh
2  bashttpd.sh
@@ -101,7 +101,7 @@ elif [ -f ${URL_PATH} -a ! -r ${URL_PATH} ]; then
101 101
 elif [ -d ${URL_PATH} ]; then
102 102
     # Return 200 for directory listings.
103 103
     # If `tree` is installed, use that for pretty output.
104  
-    if [ -x "$( which tree )" ]; then
  104
+    if which tree >/dev/null; then
105 105
         CONTENT_TYPE="text/html"
106 106
         CONTENT_BODY=$( tree -H "" -L 1 --du -D ${URL_PATH} )
107 107
     else

0 notes on commit a9694b2

Please sign in to comment.
Something went wrong with that request. Please try again.