Revision 411:e7ba81c8dc5a

View differences:

extra/soundsoftware/extract-docs.sh
22 22
    *) progdir="$(pwd)/$progdir" ;;
23 23
esac
24 24

  
25
types="doxygen javadoc" # Do Doxygen first (it can be used for Java too)
25
types="doxygen javadoc matlabdocs" # Do Doxygen first (it can be used for Java too)
26 26

  
27 27
for x in $types; do
28 28
    if [ ! -x "$progdir/extract-$x.sh" ]; then
extra/soundsoftware/extract-matlabdocs.sh
1
#!/bin/bash
2

  
3
docdir="/var/doc"
4

  
5
progdir=$(dirname $0)
6
case "$progdir" in
7
    /*) ;;
8
    *) progdir="$(pwd)/$progdir" ;;
9
esac
10

  
11
project="$1"
12
projectdir="$2"
13
targetdir="$3"
14

  
15
if [ -z "$project" ] || [ -z "$targetdir" ] || [ -z "$projectdir" ]; then
16
    echo "Usage: $0 <project> <projectdir> <targetdir>"
17
    exit 2
18
fi
19

  
20
if [ ! -d "$projectdir" ]; then
21
    echo "Project directory $projectdir not found"
22
    exit 1
23
fi
24

  
25
if [ ! -d "$targetdir" ]; then
26
    echo "Target dir $targetdir not found"
27
    exit 1
28
fi
29

  
30
if [ -f "$targetdir/index.html" ]; then
31
    echo "Target dir $targetdir already contains index.html"
32
    exit 1
33
fi
34

  
35
mfile=$(find "$projectdir" -type f -name \*.m -print0 | xargs -0 grep -l '^% ' | head -1)
36

  
37
if [ -z "$mfile" ]; then
38
    echo "No MATLAB files with comments found for project $project"
39
    exit 1
40
fi
41

  
42
echo "Project $project contains at least one MATLAB file with comments"
43

  
44
cd "$projectdir" || exit 1
45

  
46
perl "$progdir/matlab-docs.pl" -c "$progdir/matlab-docs.conf" -d "$targetdir"
47

  
extra/soundsoftware/matlab-docs.conf
154 154
#------------------------------------------------------------------------
155 155
# codehr: HTML-code used to define a <HR>, do what you want
156 156
#------------------------------------------------------------------------
157
set codehr = <hr size="3" noshade="noshade" />
157
set codehr = <hr>
158 158

  
159 159
#------------------------------------------------------------------------
160 160
# codeheader: HTML-code added to <H*> tags, use for centering header text
extra/soundsoftware/matlab-docs.pl
75 75

  
76 76
$VERSION  = '1.23';
77 77
($PROGRAM = $0) =~ s@.*/@@; $PROGRAM = "\U$PROGRAM\E";
78
$debug = 4;
78
$debug = 1;
79 79

  
80 80
#------------------------------------------------------------------------
81 81
# Define platform specific things

Also available in: Unified diff