Subversion Repositories wimsdev

Rev

Rev 12502 | Rev 15057 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
23 reyssat 1
!bound format within zip,tgz,tar.gz default zip
2
 
13318 obado 3
!set max_upload_size=500
4
 
23 reyssat 5
sel=!listintersect $selection and $reclist
6
!default sel=$reclist
12502 guerimand 7
!! deleted : don't need to uncheck score and forum by default
8
!! select=!listcomplement score,forum in $sel
23 reyssat 9
selw=!items2words $sel
10
dictionary=$module_dir/arch/recdep
11
dep=!exec translator $selw
12502 guerimand 12
!! -- generate list of data (with dependancy) really in the backup (not just the selected)
13
select=$selw $dep
14
select=!words2items $select
15
select=!listuniq $select
16
!! --
23 reyssat 17
dictionary=$module_dir/arch/recdir
18
dirs=!exec translator $selw $dep
19
dirs=!words2items $dirs
20
dirs=!listuniq $dirs
21
dirs=!items2words $dirs
22
 
2477 bpr 23
dictionary=$module_dir/lang/recnames.$moduclass_lang
23 reyssat 24
tot=!replace , by , $ in $reclist
25
tot=!exec translator $tot
26
fname=!translate internal / to ~ in $wims_class
3974 guerimand 27
!if $class_typename=course
12413 bpr 28
  tmpnum_class=!char 1 to -5 of $wims_class
3974 guerimand 29
!else
12413 bpr 30
  tmpnum_class=$wims_class
3974 guerimand 31
!endif
13318 obado 32
 
23 reyssat 33
fsize=!mexec arch/pack.sh
13318 obado 34
 
35
!! file size creation is limited by wims.c (var rlimit_fsize)
36
!! ulimit -f return the system limit to file size creation
37
!set max_arch_size=!sh ulimit -f
38
!! ulimit is defined in blocks (1 block = 512B)
39
!! So, N blocks = N*512/1024 = N/2 Ko
40
!! nb: there seems to be a bug in MacOS X causing !exec commands reseting ulimit to "unlimited"
41
!! On Linux systems, it's working as expected.
42
!if $max_arch_size!=unlimited
43
  max_arch_size=$[ceil($max_arch_size/2)]
44
!endif
45
 
46
!if $wims_exec_error!=$empty
47
  !if File too large isin $wims_exec_error or Filesize limit exceeded isin $wims_exec_error
48
    error=file_too_large
49
  !endif
50
!else
51
  wims_class_log=Backup created by $wims_realuser
52
!endif
53
 
23 reyssat 54
!if $fsize!=$empty
12413 bpr 55
  fsize=$[ceil($fsize/1024)]
56
  !setdef !set class_backup=$today in wimshome/log/classes/$wims_class/.def
23 reyssat 57
!endif