Commits

Anonymous committed b8b3311

makedocs politely tells you if no makefiles are found

  • Participants
  • Parent commits bf6661c

Comments (0)

Files changed (1)

File bin/djenvlib

 # the make command, default is "dirhtml".
 function makedocs() {
     if [ -d "$PROJECT_ROOT/doc" ]; then
-        for makefile in `ls $PROJECT_ROOT/doc/*/Makefile`; do
+        makefiles=`ls $PROJECT_ROOT/doc/*/Makefile 2>/dev/null`
+        if [ -z "$makefiles" ]; then
+            echo No makefiles found 1>&2
+            return 0
+        fi
+        for makefile in $makefiles; do
             dir=`dirname $makefile`
             echo "Making docs in $dir..."
             if [ "$1" ]; then