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