#!/bin/sh
# shell to make html for HELP config files
USAGE="$0 [file in stta/dataconf ]"

[ $# = 0 ] && echo "$USAGE" && exit 1 
if [ -e /etc/webmin/stta/dataconf/$1 ] ;
then
    file=/etc/webmin/stta/dataconf/$1 
else
    echo "$1 no exite "
    exit 1 
fi
cat $file | while read line ; 
do
  variable=`echo $line | cut -f1 -d= `
  value=`echo $line | cut -f2 -d= `
  echo "<li><b>\$infoCfg{$variable}</b> ($variable) <br>"
  echo "       <include %LANG%/config/$variable> </li>"
#  echo "       &nbsp; &nbsp; $variable $value "
  echo "&nbsp;&nbsp;\$infoCfg{$variable} ($variable) -- $value <br>" > $STTA/help/wk/$variable.html
done
