Browse Source

Add argument to prepend dir to FFOO_PATH

to easily test out documentation for currently developed library.
Alois Mahdal 9 years ago
parent
commit
b0777fc05a
1 changed files with 8 additions and 1 deletions
  1. 8
    1
      bin/ffdoc

+ 8
- 1
bin/ffdoc View File

@@ -6,9 +6,16 @@ ffoo import pretty
6 6
 
7 7
 
8 8
 usage() {
9
-    usage_is "module[.function]"
9
+    usage_is "[-I directory]... [--] module[.function]"
10 10
 }
11 11
 
12
+while true; do case "$1" in
13
+    -I|--include) FFOO_PATH="$2:$FFOO_PATH"; shift 2 ;;
14
+    --)                                 shift; break ;;
15
+    -*)                                        usage ;;
16
+    *)                                         break ;;
17
+esac done
18
+
12 19
 target=$1
13 20
 test -n "$target" || usage
14 21
 ffoo doc "$target"