blob: 4cfd8e958d83d96eb4cb845e64609a321822d472 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/usr/bin/env bash
## Error on undefined variables
set -u
echo $ERL_TOP >/dev/null
## Overridables - set as appropriate in the outer env
set -x
EDOC=${EDOC:-edoc}
CHUNKS=${CHUNKS-"-chunks"}
LIB_DIR=${LIB_DIR:-$ERL_TOP/lib}
APPS=${APPS:-$(ls -1 $LIB_DIR | grep -v Makefile)}
VERBOSE=${VERBOSE:-no}
set +x
## END of overridables
HEADERS=$(find $LIB_DIR -name \*.hrl -exec dirname '{}' \; | sort | uniq | \
grep -v ct_run | grep -v SUITE_data | grep -v /test)
INCLUDES=$(for i in $HEADERS; do echo -n "-I $i "; done; echo)
for APP in $APPS; do
echo -n "$APP: "
if [ x"yes" = x"$VERBOSE" ]; then
$EDOC $INCLUDES $CHUNKS -app $APP
else
$EDOC $INCLUDES $CHUNKS -app $APP 2>/dev/null >/dev/null \
&& echo ok \
|| echo failed
fi
done
|