Subversion Repositories wimsdev

Rev

Rev 13004 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 13004 Rev 13111
Line 2... Line 2...
2
n=!recordcnt lang/cat.$modu_lang
2
n=!recordcnt lang/cat.$modu_lang
3
!bound confcat between 1 and $n default 1
3
!bound confcat between 1 and $n default 1
4
l=!record $confcat of lang/cat.$modu_lang
4
l=!record $confcat of lang/cat.$modu_lang
5
!distribute lines $l into catname, cattit
5
!distribute lines $l into catname, cattit
6
!if $catname=housekeep
6
!if $catname=housekeep
7
 !readproc mu/publishdownload.def
7
  !readproc mu/publishdownload.def
8
!endif
8
!endif
9
 
9
 
10
!if $catname=appearances
10
!if $catname=appearances
11
  csslist=!sh cd html/css/$lang; ls *.css | sed 's/\.css$$//' | sort
11
  csslist=!sh cd html/css/$lang; ls *.css | sed 's/\.css$$//' | sort
12
  csslist=!words2items ---- -theme- $csslist
12
  csslist=!words2items ---- -theme- $csslist
Line 20... Line 20...
20
    !set iconpromptlist=!append item $icon_title to $iconpromptlist
20
    !set iconpromptlist=!append item $icon_title to $iconpromptlist
21
  !next
21
  !next
22
!endif
22
!endif
23
 
23
 
24
!if $catname=graphics
24
!if $catname=graphics
25
 chtest=!sh ls $wims_home/chroot/tmp/sessions/.chroot 2>/dev/null
25
  chtest=!sh ls $wims_home/chroot/tmp/sessions/.chroot 2>/dev/null
26
 !if chroot isin $chtest
26
  !if chroot isin $chtest
27
  cvtest=new.png
27
    cvtest=new.png
28
 !else
28
  !else
29
  cvtest=!sh convert gifs/new.gif ../tmp/new.png >/dev/null\
29
    cvtest=!sh convert gifs/new.gif ../tmp/new.png >/dev/null\
30
   ls ../tmp/new.png 2>/dev/null\
30
    ls ../tmp/new.png 2>/dev/null\
31
   rm -f ../tmp/new.png >/dev/null
31
    rm -f ../tmp/new.png >/dev/null
32
 !endif
32
  !endif
33
!endif
33
!endif
34
 
34
 
35
!if $catname=software
35
!if $catname=software
36
 !reset othermiss
36
  !reset othermiss
37
 !distribute items tool/number/baseconv,\
37
  !distribute items tool/number/baseconv,\
38
	H6/algebra/decrypt,\
38
	 H6/algebra/decrypt,\
39
	adm/doc,\
39
	 adm/doc,\
40
	H5/physics/chim1,\
40
	 H5/physics/chim1,\
41
	H5/physics/travail,\
41
	 H5/physics/travail,\
42
	into mod_bc,mod_fortune,mod_perl,mod_chemeq,mod_units,babel
42
	 into mod_bc,mod_fortune,mod_perl,mod_chemeq,mod_units,babel
43
 otherlist=tex perl bc fortune chemeq units-filter ldapsearch tac
43
  otherlist=tex perl bc fortune chemeq units-filter ldapsearch tac
44
 test=!sh for bin in $otherlist\
44
  test=!sh for bin in $otherlist\
45
  do\
45
   do\
46
   which $$bin\
46
   which $$bin\
47
  done
47
  done
48
 otherlist=!words2items $otherlist
48
  otherlist=!words2items $otherlist
49
 !for other in $otherlist
49
  !for other in $otherlist
50
  !if /$other notin $test
50
    !if /$other notin $test
51
   othermiss=!append item $other to $othermiss
51
      othermiss=!append item $other to $othermiss
52
  !endif
52
    !endif
53
 !next other
53
  !next other
54
 !if perl notin in $othermiss
54
  !if perl notin in $othermiss
55
   !set pack_validation=WebService::Validator::HTML::W3C
55
    !set pack_validation=WebService::Validator::HTML::W3C
56
   !sh perl -M$pack_validation -e 1
56
    !sh perl -M$pack_validation -e 1
57
   !if $wims_exec_error!=$empty
57
    !if $wims_exec_error!=$empty
58
     othermiss=!append item validation to $othermiss
58
      othermiss=!append item validation to $othermiss
59
     !reset wims_exec_error
59
      !reset wims_exec_error
60
   !endif
60
    !endif
61
   !set pack_perldate=Time::Piece
61
    !set pack_perldate=Time::Piece
62
   !sh perl -M$pack_perldate -e 1
62
    !sh perl -M$pack_perldate -e 1
63
   !if $wims_exec_error!=$empty
63
    !if $wims_exec_error!=$empty
64
     othermiss=!append item perldate to $othermiss
64
      othermiss=!append item perldate to $othermiss
65
     !reset wims_exec_error
65
      !reset wims_exec_error
66
   !endif
66
    !endif
67
  !endif
67
  !endif
68
!! test for non posix options for date and stat.
68
  !! test for non posix options for date and stat.
69
  test=!sh date -d '20 minutes' '+%s'
69
  test=!sh date -d '20 minutes' '+%s'
70
  !if $wims_exec_error!=$empty
70
  !if $wims_exec_error!=$empty
71
     othermiss=!append item date to $othermiss
71
    othermiss=!append item date to $othermiss
72
     !reset wims_exec_error
72
    !reset wims_exec_error
73
  !endif
73
  !endif
74
  test=!sh stat -c'%s' .
74
  test=!sh stat -c'%s' .
75
  !if $wims_exec_error!=$empty
75
  !if $wims_exec_error!=$empty
76
     othermiss=!append item stat to $othermiss
76
    othermiss=!append item stat to $othermiss
77
     !reset wims_exec_error
77
    !reset wims_exec_error
78
  !endif
78
  !endif
79
!endif
79
!endif
80
 
80
 
81
!readdef wimshome/public_html/bases/sys/defaults.conf
81
!readdef wimshome/public_html/bases/sys/defaults.conf
82
 
82
 
83
!! test for QRencoder
83
!! test for QRencoder
84
testn=!defof QRencode_command in wimshome/log/wims.conf
84
testn=!defof QRencode_command in wimshome/log/wims.conf
85
!default testn=$DF_QRencode_command
85
!default testn=$DF_QRencode_command
86
testn=!word 1 of $testn
86
testn=!word 1 of $testn
87
test=!sh which $testn
87
test=!sh which $testn
88
!if /$testn notin $test
88
!if /$testn notin $test
89
 !setdef QRencode_open=no in wimshome/log/wims.conf
89
  !setdef QRencode_open=no in wimshome/log/wims.conf
90
 othermiss=!append item QRencode to $othermiss
90
  othermiss=!append item QRencode to $othermiss
91
!else
91
!else
92
 !setdef QRencode_open=yes in wimshome/log/wims.conf
92
  !setdef QRencode_open=yes in wimshome/log/wims.conf
93
!endif
93
!endif
94
!! ---------------- end test
94
!! ---------------- end test
95
 
-
 
-
 
95
backup_delete=!defof backup_delete in wimshome/public_html/bases/sys/define.conf
96
confcnt=!recordcnt lang/confdata.$modu_lang
96
confcnt=!recordcnt lang/confdata.$modu_lang
97
!for i=1 to $confcnt
97
!for i=1 to $confcnt
98
  l=!record $i of lang/confdata.$modu_lang
98
  l=!record $i of lang/confdata.$modu_lang
99
  n_=!word 2 of $l
99
  n_=!word 2 of $l
100
  $n_=$(DF_$n_)
100
  $n_=$(DF_$n_)
Line 102... Line 102...
102
wims_prefix=
102
wims_prefix=
103
!readdef wimshome/log/wims.conf
103
!readdef wimshome/log/wims.conf
104
wims_prefix=$wims_prefix2
104
wims_prefix=$wims_prefix2
105
 
105
 
106
!if $save!=$empty
106
!if $save!=$empty
107
 changed=0
107
  changed=0
108
 !writefile wimshome/log/wims.conf2 # This file is automatically generated by the online site maintenance tool.\
108
  !writefile wimshome/log/wims.conf2 # This file is automatically generated by the online site maintenance tool.\
109
# You can still edit it by hand, but documentation is only available in the\
109
   # You can still edit it by hand, but documentation is only available in the\
110
# online tool.\
110
   # online tool.\
111
#
111
   #
112
 !for i=1 to $confcnt
112
  !for i=1 to $confcnt
113
  l=!record $i of lang/confdata.$modu_lang
113
    l=!record $i of lang/confdata.$modu_lang
114
  ltype=!line 3 of $l
114
    ltype=!line 3 of $l
115
  lbound=!line 4 of $l
115
    lbound=!line 4 of $l
116
  l=!line 1 of $l
116
    l=!line 1 of $l
117
  !distribute words $l into c_,n_,w_
117
    !distribute words $l into c_,n_,w_
118
  v_=$($n_)
118
    v_=$($n_)
119
  !if $catname isitemof $c_
119
    !if $catname isitemof $c_
120
   !!! check the download center
120
      !!! check the download center
121
   !if housekeep iswordof $catname and mu_download_site iswordof $n_
121
      !if housekeep iswordof $catname and mu_download_site iswordof $n_
122
    !reset error_list
122
        !reset error_list
123
    !for depot in $(conf_$i)
123
        !for depot in $(conf_$i)
124
     addr=!defof mu_site in wimshome/public_html/bases/sys/publishcenter/$depot
124
          addr=!defof mu_site in wimshome/public_html/bases/sys/publishcenter/$depot
125
     webget_output=test_exists_site
125
          webget_output=test_exists_site
126
     !exec webget $addr/index.gz
126
          !exec webget $addr/index.gz
127
     download_site_exists=!record 0 of wimshome/sessions/$wims_session/$webget_output
127
          download_site_exists=!record 0 of wimshome/sessions/$wims_session/$webget_output
128
     !! the following tests if there is an html answer or if the file is empty
128
          !! the following tests if there is an html answer or if the file is empty
129
     !! but the first test is no more valid (the answer has changed)
129
          !! but the first test is no more valid (the answer has changed)
130
     !! and the second one gives an error for some zipped file
130
          !! and the second one gives an error for some zipped file
131
     !! does not seem very useful
131
          !! does not seem very useful
132
     !!!if HTTP 404 isin $download_site_exists or $download_site_exists=$empty
132
          !!!if HTTP 404 isin $download_site_exists or $download_site_exists=$empty
133
     !!   error_list=!append item $depot to $error_list
133
          !!   error_list=!append item $depot to $error_list
134
     !!!endif HTTP
134
          !!!endif HTTP
135
    !next depot
135
        !next depot
136
    !if $error_list!=$empty
136
        !if $error_list!=$empty
137
     error=no_download_sites
137
          error=no_download_sites
-
 
138
          !exit
-
 
139
        !endif
-
 
140
      !endif housekeep
-
 
141
      v_=$(conf_$i)
-
 
142
      v_=!trim $v_
-
 
143
      v_=!singlespace $v_
-
 
144
      v_=!replace internal \ by $ in $v_
-
 
145
      !! test if v_ is an integer if it should be and if it is non empty
-
 
146
      !if $ltype=int and $v_!=$empty
-
 
147
        v_=!text select 0123456789 in $v_
-
 
148
      !default v_=$(lbound[2])
-
 
149
    !endif
-
 
150
    !!FIXME take in account the parameters in confdata.$lang in case the type is int
-
 
151
    !! I comment because I am not sure it is a good idea for all fields
-
 
152
    !! but why is it in the file confdata.xx if it is not used ??
-
 
153
    !!!if $ltype=int and $v_!=$empty and $(lbound)!=$empty
-
 
154
    !!  !bound v_ between integer $(lbound[1]) and $(lbound[2])
-
 
155
    !! !reset ltype lbound
-
 
156
    !!!endif
-
 
157
    !if $v_!=$($n_)
-
 
158
      changed=1
-
 
159
      $n_=$v_
-
 
160
    !endif
-
 
161
    !if $n_=css and $v_=none
-
 
162
      v_=
138
     !exit
163
    !endif
-
 
164
    !if $n_=theme_icon and $wims_theme iswordof column columnb default classic
-
 
165
      v_=default
139
    !endif
166
    !endif
140
   !endif housekeep
-
 
141
   v_=$(conf_$i)
-
 
142
   v_=!trim $v_
-
 
143
   v_=!singlespace $v_
-
 
144
   v_=!replace internal \ by $ in $v_
-
 
145
!! test if v_ is an integer if it should be and if it is non empty
-
 
146
   !if $ltype=int and $v_!=$empty
-
 
147
       v_=!text select 0123456789 in $v_
-
 
148
       !default v_=$(lbound[2])
-
 
149
   !endif
-
 
150
!!FIXME take in account the parameters in confdata.$lang in case the type is int
-
 
151
!! I comment because I am not sure it is a good idea for all fields
-
 
152
!! but why is it in the file confdata.xx if it is not used ??
-
 
153
   !!!if $ltype=int and $v_!=$empty and $(lbound)!=$empty
-
 
154
   !!  !bound v_ between integer $(lbound[1]) and $(lbound[2])
-
 
155
   !! !reset ltype lbound
-
 
156
   !!!endif
-
 
157
   !if $v_!=$($n_)
-
 
158
    changed=1
-
 
159
    $n_=$v_
-
 
160
   !endif
-
 
161
   !if $n_=css and $v_=none
-
 
162
    v_=
-
 
163
   !endif
-
 
164
   !if $n_=theme_icon and $wims_theme iswordof column columnb default classic
-
 
165
    v_=default
-
 
166
   !endif
-
 
167
  !endif
167
  !endif
168
  !if $v_!=$(DF_$n_)
168
  !if $v_!=$(DF_$n_)
169
   !appendfile wimshome/log/wims.conf2 $n_=$v_
169
    !appendfile wimshome/log/wims.conf2 $n_=$v_
170
  !endif
170
  !endif
171
  !if $w_ !=$empty and $w_ iswordof wims_bgcolor wims_bgimg wims_ref_bgcolor wims_css wims_theme wims_theme_icon wims_ref_menucolor \
171
  !if $w_ !=$empty and $w_ iswordof wims_bgcolor wims_bgimg wims_ref_bgcolor wims_css wims_theme wims_theme_icon wims_ref_menucolor \
172
    ref_button_help_bgcolor ref_button_help_color ref_button_bgcolor ref_button_color
172
      ref_button_help_bgcolor ref_button_help_color ref_button_bgcolor ref_button_color
173
   $w_=$v_
173
    $w_=$v_
174
  !endif
174
  !endif
175
 !next i
175
!next i
176
 !if $changed>0
176
!if $changed>0
177
  backdir=!mexec scripts/confcopy.sh
177
  backdir=!mexec scripts/confcopy.sh
178
 !endif
178
!endif
179
 !sh rm -f $wims_home/log/wims.conf2
179
 !sh rm -f $wims_home/log/wims.conf2
180
 !restart cmd=reply
180
 !restart cmd=reply
181
!endif
181
!endif
182
 
-