-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmkdocs
executable file
·57 lines (52 loc) · 1.1 KB
/
mkdocs
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
#
# Dec 2003 Mike gore
#
if (($# != 1))
then
echo Usage $0 document_file
echo - Can be used as a starting point for code documentation
echo - Processes all .asm and .h files
echo for function entry points and MACRO comments
exit 1
fi
DOCS=$1
rm -f $DOCS
echo ======================================================== >>"$DOCS"
echo This is an Automatically generated file >>"$DOCS"
echo Created on `date` >>"$DOCS"
echo ======================================================== >>"$DOCS"
# Process ASM files
for i in *\.asm
do
if [ -f $i ]
then
if [ $i = $0 ]
then
echo Skipping: $0
else
echo ======================================================== >>"$DOCS"
echo File: $i >>"$DOCS"
grep -e '^[A-Za-z0-9_]*:' $i >>"$DOCS"
fi
else
echo Ignoring Directory: $i
fi
done
# Process H files
for i in *\.h
do
if [ -f $i ]
then
if [ $i = $0 ]
then
echo Skipping: $0
else
echo ======================================================== >>"$DOCS"
echo File: $i >>"$DOCS"
grep -B 1 -h MACRO $i >>"$DOCS"
fi
else
echo Ignoring Directory: $i
fi
done