Commit 97275236 authored by Vinicius Ruoso's avatar Vinicius Ruoso

Created script to generate the SDI top bar.

This script get the SDI bar model, on html/sdibar.html, and creates a list of
options on a HTML select box.

The result is a new bar on file html/sdibar_generated.html.
Signed-off-by: default avatarVinicius Ruoso <vkr07@c3sl.ufpr.br>
parent 0848f3f8
BARHTML=$PREFIX/html/sdibar.html
BARFILE=$PREFIX/html/sdibar_generated.html
OPTIONS=""
main()
{
if [ "$GENERATESUMMARY" == "true" ]; then
add_option sumary SUMARIO
fi
for TYPE in $TYPEDIR/*; do
add_option single $TYPE
done
sed "s/(PAGES)/${OPTIONS}/g" $BARHTML > $BARFILE
}
function add_option()
{
if [ $1 == "sumary" ]; then
LOWER=$(echo $2 |tr '[:upper:]' '[:lower:]')
OPTIONS="${OPTIONS}<option value=\"${LOWER}.html\">$2<\/option>\n"
else
NAME=$(basename $2)
SHOW=$(echo $2 |sed -e "s#\/#\\\/#g" |tr '_' ' ')
OPTIONS="${OPTIONS}<option value=\"${NAME}\/\">${SHOW}<\/option>\n"
fi
}
main $*
# vim:tabstop=4:shiftwidth=4:encoding=utf-8:expandtab
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment