forked from u-blox/u-connectXpress-host-library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mkdocs.sh
23 lines (20 loc) · 838 Bytes
/
mkdocs.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
URC=include/ucxh_urc.h
URCLINES=`wc -l $URC`
egrep "__BEGIN_GREP_MAGIC__" \
--after-context=$URCLINES \
--initial-tab \
$URC > .tmp1
URCLINES2=`wc -l .tmp1`
MAGICLINES=`egrep "__END_GREP_MAGIC__" --line-number --initial-tab .tmp1 | sed -e "s/://g" - | awk '{print $1}' | head -1`
egrep "__END_GREP_MAGIC__" --before-context=$MAGICLINES --line-number --initial-tab .tmp1 > .tmp2
SEDCMD=s,$URC-,,g
#SEDCMD2="s,[0-9],,g"
SEDCMD2="s,\s[0-9][0-9]*,,g"
egrep _XMACRO .tmp2 | sed -e "$SEDCMD" > .tmp3
sed < .tmp3 -e "$SEDCMD2" > .tmp4
sed < .tmp4 -e "s/-//g" | sed -e "s/_XMACRO(//g" | sed -e "s/)//g" | sed -e "s/\\\//g" | sed -e "s/\t//g" | sed -e "s/ / /g"> .tmp5
awk --field-separator , --file findlist.awk .tmp5 > resources/autogenerated.h
rm .tmp1 .tmp2 .tmp3 .tmp4 .tmp5
rm -rf html
doxygen | grep -v ...\$