Merge "ORM: Rename timeperiod field "in" to "is_active""
[ninja.git] / php2doxy.sh
blob28360a788fec22ba425798ca65fcfaaa8d5f5372
1 #!/bin/sh
3 if test "$#" -eq 0; then
4 echo "phpdoc to doxygen conversion"
5 echo
6 echo "Usage: $0 [-i] [-e sed-expression] file1 file2 file3 filen..."
7 echo
8 echo " -i provides in-place editing of the files given as arguments"
9 echo " -e lets you add additional sed expressions to the command line"
10 echo
11 echo "If run without '-i', output is sent to stdout"
12 exit 1
15 sed -e '/^[\t ]*\*[\t ]*@name/d' \
16 -e 's/^\([\t ]*\*\)[\t ]\+/\1 /' \
17 -e 's/^\(\t*\)[\t ]*\*/\1 */' \
18 -e 's/^\([\t ]*\*\)[\t ]*\(@[A-Za-z0-9_-]*\)[\t ]*/\1 \2 /' \
19 -e 's/^\([\t ]*\*\)[\t ]*@desc[\t ]*\(.*\)/\1 \2/' \
20 -e 's/\(* @param\) [^$ ]*[\t ]*\(.*\)/\1 \2/' \
21 -e 's/[\t ]*$//' \
22 -e 's/^class[\t ]*\([^ {]*\)[\t ]*{/class \1\n{/' \
23 "$@"