Subversion Repositories wimsdev

Rev

Rev 3064 | Rev 6688 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed


n=!recordcnt lang/cat.$modu_lang
!bound confcat between 1 and $n default 1
l=!record $confcat of lang/cat.$modu_lang
!distribute lines $l into catname, cattit
!if $catname=housekeep
 !readproc mu/publishdownload.def
!endif

!if $catname=appearances
 csslist=!sh cd html/css/$lang; ls *.css | sed 's/\.css$$//' | sort
 csslist=!words2items ---- -theme- $csslist
 themelist=!sh find themes -name visitor.phtml | sed 's!^themes/!!;s!/visitor.phtml$!!' | sort
 themelist=!words2items $themelist
 themelist=!listuniq default,$themelist
 iconlist=!sh cd gifs/themes/;ls | sort
!!not very clean
 iconlist=!replace internal mkindex by in $iconlist
 iconlist=!words2items $iconlist
!endif

!if $catname=graphics
 chtest=!sh ls $wims_home/chroot/tmp/sessions/.chroot 2>/dev/null
 !if chroot isin $chtest
  cvtest=new.png
 !else
  cvtest=!sh convert gifs/new.gif ../tmp/new.png >/dev/null\
   ls ../tmp/new.png 2>/dev/null\
   rm -f ../tmp/new.png >/dev/null
 !endif
!endif

!if $catname=software
 !reset othermiss
 !distribute items tool/number/baseconv,\
        H6/algebra/decrypt,\
        adm/doc,\
        H5/physics/chim1,\
        H3/geometry/oefsect,\
        into mod_bc,mod_fortune,mod_perl,mod_chemeq,mod_units
# otherlist=tex perl bc fortune chemeq units-filter
 otherlist=tex perl chemeq units-filter ldapsearch
 test=!sh for bin in $otherlist\
  do\
   which $$bin\
  done
 otherlist=!words2items $otherlist
 !for other in $otherlist
  !if /$other notin $test
   othermiss=!append item $other to $othermiss
  !endif
 !next other
!endif

!readdef wimshome/public_html/bases/sys/defaults.conf
confcnt=!recordcnt lang/confdata.$modu_lang
!for i=1 to $confcnt
  l=!record $i of lang/confdata.$modu_lang
  n_=!word 2 of $l
  $n_=$(DF_$n_)
!next i
wims_prefix=
!readdef wimshome/log/wims.conf
wims_prefix=$wims_prefix2

!if $save!=$empty
 changed=0
 !writefile wimshome/log/wims.conf2 # This file is automatically generated by the online site maintenance tool.\
# You can still edit it by hand, but documentation is only available in the\
# online tool.\
#
 !for i=1 to $confcnt
  l=!record $i of lang/confdata.$modu_lang
  l=!line 1 of $l
  !distribute words $l into c_,n_,w_
  v_=$($n_)
  !if $catname isitemof $c_
   !!! check the download center
   !if housekeep iswordof $catname and mu_download_site iswordof $n_
    !reset error_list
    !for depot in $(conf_$i)
     addr=!defof mu_site in wimshome/public_html/bases/sys/publishcenter/$depot
     webget_output=test_exists_site
     !exec webget $addr/index.gz
     download_site_exists=!record 0 of wimshome/sessions/$wims_session/$webget_output
     !if HTTP 404 isin $download_site_exists or $download_site_exists=$empty
       error_list=!append item $depot to $error_list
     !endif HTTP
    !next depot
    !if $error_list!=$empty
     error=no_download_sites
     !exit
    !endif
   !endif housekeep
   v_=$(conf_$i)
   v_=!trim $v_
   v_=!singlespace $v_
   v_=!replace internal \ by $ in $v_
   !if $v_!=$($n_)
    changed=1
    $n_=$v_
   !endif
   !if $n_=css and $v_=none
    v_=
   !endif
   !if $n_=theme_icon and $wims_theme iswordof column columnb default classic
    v_=default
   !endif
  !endif
  !if $v_!=$(DF_$n_)
   !appendfile wimshome/log/wims.conf2 $n_=$v_
  !endif
  !if $w_ !=$empty and $w_ iswordof wims_bgcolor wims_bgimg wims_ref_bgcolor wims_css wims_theme wims_theme_icon wims_ref_menucolor \
    ref_button_help_bgcolor ref_button_help_color ref_button_bgcolor ref_button_color
   $w_=$v_
  !endif
 !next i
 !if $changed>0
  backdir=!mexec scripts/confcopy.sh
 !endif
 !sh rm -f $wims_home/log/wims.conf2
 !restart cmd=reply
!endif