Jpp  17.3.0-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
doxygen.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 #
3 #--------------------------------------------------------------------------------------
4 #
5 # Utility script for generation of HTML Doxygen main page.
6 #
7 #--------------------------------------------------------------------------------------
8 # \author mdejong
9 #
10 script=${0##*/}
11 
12 if [ -z $JPP_DIR ]; then
13  echo "Variable JPP_DIR undefined."
14  exit 1
15 fi
16 
17 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
18 
19 if do_usage $*; then
20  usage "$script"
21 fi
22 
23 setopt +o nomatch
24 setopt extendedglob
25 
26 set_variable NUMBER_OF_COLUMNS 3
27 
28 
29 echo "/**"
30 echo " * \mainpage Documentation"
31 echo " * \htmlonly"
32 echo " * <style>"
33 echo " * ul.b { list-style-type: none; counter-reset: section; columns: ${NUMBER_OF_COLUMNS}; -moz-column-count: ${NUMBER_OF_COLUMNS}; -webkit-column-count: ${NUMBER_OF_COLUMNS}; column-count: ${NUMBER_OF_COLUMNS}; }"
34 echo " * </style>"
35 
36 # Documents
37 
38 echo " * <hr>"
39 echo " * <h2>Documents</h2>"
40 echo " * <ul class=\"b\">"
41 for file in `ls ${JPP_DOC}/*`; do
42  if [ -f ${file} ]; then
43  echo " * <li><a href=\"${file##*/}\">${file##*/}</a></li>"
44  fi
45 done
46 echo " * </ul>"
47 
48 
49 # Applications header
50 
51 echo " * <hr>"
52 echo " * <h2>Applications</h2>"
53 echo " * <ul class=\"b\">"
54 for file in `ls ${JPP_BIN}`; do
55  if [[ ! $file = *.sh && ! $file = *.csh ]]; then
56  echo " * <li><a href=\"#${file}\">${file}</a></li>"
57  fi
58 done
59 echo " * </ul>"
60 
61 
62 # Scripts header
63 
64 echo " * <hr>"
65 echo " * <h2>Scripts</h2>"
66 echo " * <ul class=\"b\">"
67 for file in `ls ${JPP_BIN}`; do
68  if [[ $file = *.sh || $file = *.csh ]]; then
69  echo " * <li><a href=\"#${file}\">${file}</a></li>"
70  fi
71 done
72 echo " * </ul>"
73 
74 
75 # Examples header
76 
77 echo " * <hr>"
78 echo " * <h2>Examples</h2>"
79 echo " * <ul class=\"b\">"
80 for dir in `ls $JPP_DIR/examples`; do
81  echo " * <li><a href=\"#examples/${dir}\">${dir}</a></li>"
82 done
83 echo " * </ul>"
84 
85 
86 # Applications data
87 
88 for file in `ls ${JPP_BIN}`; do
89 
90  if [[ ! $file = *.sh && ! $file = *.csh ]]; then
91 
92  source=`get_source ${file}`
93 
94  echo " * <hr>"
95  echo " * <h4 id=\"${file}\">"
96  if [[ -n "${source}" ]]; then
97  if [[ ${source} == *software* ]] && ( `ls $JPP_DIR/examples/*/${source##*/} >& /dev/null` ); then
98  source=${source##${JPP_DIR%/}/}
99  else
100  source=${source##*/}
101  fi
102  echo " * \\\\endhtmlonly"
103  echo " * ${source}"
104  echo " * \htmlonly"
105  else
106  echo " * ${file}"
107  fi
108  echo " * </h4>"
109  echo " * <pre>"
110  ${file} -h! 2> /dev/null | sed 's/</\&lt;/g;s/>/\&gt;/g'
111  echo " * </pre>"
112  echo " * <a href="#top">Go back to top of page.</a>"
113  fi
114 done
115 
116 
117 # Scripts data
118 
119 for file in `ls ${JPP_BIN}`; do
120 
121  if [[ $file = *.sh || $file = *.csh ]]; then
122 
123  source=`eval ls $JPP_DIR/software/*/$file`
124 
125  echo " * <hr>"
126  echo " * <h4 id=\"${file}\">"
127  if [[ -n "${source}" ]]; then
128  if [[ ${source} == *software* ]] && ( `ls $JPP_DIR/examples/*/${source##*/} >& /dev/null` ); then
129  source=${source##${JPP_DIR%/}/}
130  else
131  source=${source##*/}
132  fi
133  echo " * \\\\endhtmlonly"
134  echo " * ${source}"
135  echo " * \htmlonly"
136  else
137  echo " * ${file}"
138  fi
139  echo " * </h4>"
140  echo " * <pre>"
141  ${file} -h! 2> /dev/null | sed 's/</\&lt;/g;s/>/\&gt;/g'
142  echo " * </pre>"
143  echo " * <a href="#top">Go back to top of page.</a>"
144  fi
145 done
146 
147 
148 # Examples data
149 
150 for dir in `ls $JPP_DIR/examples`; do
151 
152  echo " * <hr>"
153  echo " * <h4 id=\"examples/${dir}\">${dir}</h4>"
154  echo " * <ul class=\"b\">"
155  for file in `find $JPP_DIR/examples/${dir}/* -maxdepth 0 -perm /+x`; do
156  echo " * <li><a href=\"#${file}\">${file##*/}</a></li>"
157  done
158  echo " * </ul>"
159  echo " * <a href="#top">Go back to top of page.</a>"
160 
161  for file in `find $JPP_DIR/examples/${dir}/* -maxdepth 0 -perm /+x`; do
162 
163  if [[ ! $file = *.sh && ! $file = *.csh ]]; then
164  source=`get_source ${file}`
165  else
166  source=$file
167  fi
168 
169  echo " * <hr>"
170  echo " * <h4 id=\"${file}\">"
171  if [[ -n "${source}" ]]; then
172  if [[ ${source} == *examples* ]] && (`ls $JPP_DIR/software/*/${source##*/} >& /dev/null` || `ls $JPP_DIR/examples/^${dir}/${source##*/} >& /dev/null`); then
173  source=${source##${JPP_DIR%/}/}
174  else
175  source=${source##*/}
176  fi
177  echo " * \\\\endhtmlonly"
178  echo " * ${source}"
179  echo " * \htmlonly"
180  else
181  echo " * ${file}"
182  fi
183  echo " * </h4>"
184  echo " * <pre>"
185  ${file} -h! 2>&1 | sed 's/</\&lt;/g;s/>/\&gt;/g'
186  echo " * </pre>"
187  echo " * <a href="#top">Go back to top of page.</a>"
188  done
189 done
190 
191 echo " * \\\\endhtmlonly"
192 echo " */"
then usage $script[< detector identifier >< run range >]< QA/QCfile > nExample script to produce data quality plots nWhen a detector identifier and run range are data are downloaded from the database nand subsequently stored in the given QA QC file
Definition: JDataQuality.sh:19
exit
Definition: JPizza.sh:36
then fatal Wrong number of arguments fi JConvertDetectorFormat a o
then echo
const int n
Definition: JPolint.hh:697
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
Definition: JAcoustics.sh:21
then JCalibrateToT a
Definition: JTuneHV.sh:116
* usage
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
Definition: JCanberra.sh:46
script
Definition: JAcoustics.sh:2
esac $JPP_BIN JLogger sh $LOGGER until pgrep JGetMessage</dev/null > dev null
esac done
Definition: JAddHDE.sh:21