Changeset 66516
- Timestamp:
- Oct 16, 2015, 6:53:02 AM (9 years ago)
- Location:
- grass-addons/tools/addons
- Files:
-
- 1 added
- 1 edited
-
get_page_description.sh (added)
-
grass-addons-index.sh (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
grass-addons/tools/addons/grass-addons-index.sh
r66403 r66516 65 65 # grass.osgeo.org SERVER 66 66 cd /var/www/grass/grass-cms/grass${major}${minor}/manuals/addons 67 SRC=${HOME}/src/ 67 68 68 69 if test -f index.html ; then … … 108 109 <hr>" > index.html 109 110 110 # fetch one-line descriptions into a separate file:111 # let's try to be more robust against missing keywords in a few HTML pages112 111 prefix_last="" 113 112 for currfile in `ls -1 *.html | grep -v index.html` ; do … … 125 124 module=`echo $currfile | sed 's+\.html$++g'` 126 125 echo "<li style=\"margin-left: 20px\"><a href=\"$currfile\">$module</a>:" >> index.html 127 grep 'KEYWORDS' $currfile 2> /dev/null > /dev/null 128 if [ $? -eq 0 ] ; then 129 # keywords found, so go ahead with extraction of one-line description 130 cat $currfile | awk '/NAME/,/KEYWORDS/' | grep ' - ' | cut -d'-' -f2- | cut -d'<' -f1 | sed 's+>$+></li>+g' >> /tmp/d.$TMP 131 # argh, fake keyword line found (broken manual page or missing g.parser usage) 132 if [ ! -s /tmp/d.$TMP ] ; then 133 echo "(incomplete manual page, please fix)" > /tmp/d.$TMP 134 fi 135 cat /tmp/d.$TMP >> index.html 136 rm -f /tmp/d.$TMP 137 else 138 # argh, no keywords found (broken manual page or missing g.parser usage) 139 echo "(incomplete manual page, please fix)" >> index.html 140 fi 126 ${SRC}grass-addons/tools/addons/get_page_description.sh $currfile >> index.html 141 127 done 142 128
Note:
See TracChangeset
for help on using the changeset viewer.
