#!/bin/sh
lista=""
#lista=`ls es/head/stup_*.html`
lista="stta_tta stta_ldap stta_webmin"
lista="ttabackup ttaensbk ttaarchive ttaps ttaensload ttaensrecreate ttaensdump ttaensrestore ttastatus ldapbackup ldapldif ldapusers ldapload ldapreplica ldapschema"
lista="svhistact filemgr logldapsrv loghttp dirlogstta dirlogscache logsystem logstta synclist dirsave"
lista="webhelp sttabrandmgr"
lista="other_webminsrv other_hostsync other_deflists other_synclists other_replicalists"
lista="scancache tclextend passwdcache"
lista="listlogs listlogs_config"
lista="monitor_act ttascript cfgmonitor"
lista="ttasess ttasess_count ttasess_bill fticketstatus"
lista="alivehosts";
lista="searchlog viewlog";
lista="ldap_loglist";

baseDir=$STTA/help
template=$baseDir/es/templ/page
head_template=$baseDir/es/templ/head
body_template=$baseDir/es/templ/body
msg_template=$baseDir/es/templ/msg
for file in `echo $lista`
do
  name=$file
  [ -r $file ] &&  name=`echo $file | sed 's/.es//g' | sed 's/.html//g'`
  cat $template | sed "s/NAME/$name/g"  >$baseDir/$name.html
  [ -r $file ] && rm $file
  cat $head_template >$baseDir/es/head/$name.html
  cat $msg_template >$baseDir/es/msg/$name.html
  cat $body_template >$baseDir/es/body/$name.html
done
