Rev 16013 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
23 | reyssat | 1 | !if $job2=restore |
12413 | bpr | 2 | !goto next |
23 | reyssat | 3 | !endif |
4 | wims_deposit=!word 1 of $wims_deposit |
||
5 | selection= |
||
6 | gotlist= |
||
7 | |||
8 | !if . notin $wims_deposit or / isin $wims_deposit or .. isin $wims_deposit |
||
12413 | bpr | 9 | error=bad_file |
10 | !exit |
||
23 | reyssat | 11 | !endif |
12 | |||
13 | t=!translate . to $ $ in $wims_deposit |
||
14 | format=!word 2 to -1 of $t |
||
15 | format=!translate $ $ to . in $format |
||
16 | !if $format notwordof tgz tar.gz zip |
||
12413 | bpr | 17 | error=bad_file |
18 | !exit |
||
23 | reyssat | 19 | !endif |
20 | |||
21 | !mexec arch/decompress.sh |
||
22 | :next |
||
23 | new=$wims_sesdir/upload/class |
||
24 | old=log/classes/$wims_class |
||
25 | v=!record 0 of wimshome/$new/version |
||
26 | v=!trim $v |
||
10714 | bpr | 27 | !!version <=4 for classes |
28 | !if $v=$empty or $v<4 |
||
12413 | bpr | 29 | error=bad_file |
30 | !exit |
||
23 | reyssat | 31 | !endif |
32 | |||
33 | !for type in new,old |
||
12413 | bpr | 34 | !read scripts/reccnt.proc $type $($type) |
16013 | guerimand | 35 | t=!defof class_defined in wimshome/$($type)/.def |
12413 | bpr | 36 | !if $t=yes |
37 | $(type)_defcnt=1 |
||
38 | !else |
||
39 | $(type)_defcnt=0 |
||
40 | !endif |
||
23 | reyssat | 41 | !next type |
42 | new_reccnt=$[$new_reccnt+$new_defcnt+$new_supcnt] |
||
16091 | guerimand | 43 | forbiddenlist=$empty |
23 | reyssat | 44 | |
45 | !for rec in $reclist |
||
12413 | bpr | 46 | !if $(new_$(rec)cnt)>0 |
47 | gotlist=!append item $rec to $gotlist |
||
16091 | guerimand | 48 | !if $(max_$rec)!=$empty and $(new_$(rec)cnt)>$(max_$rec) |
49 | forbiddenlist=!append word $rec to $forbiddenlist |
||
50 | !endif |
||
12413 | bpr | 51 | !endif |
23 | reyssat | 52 | !next rec |
16091 | guerimand | 53 | !if $forbiddenlist!=$empty |
54 | dictionary=$module_dir/arch/recdepinv |
||
55 | forbiddenlistdep=!exec translator $forbiddenlist |
||
56 | forbiddenlistdep=!words2items $forbiddenlistdep |
||
57 | forbiddenlist=!words2items $forbiddenlist |
||
58 | forbiddenlistdep=!listunion $forbiddenlistdep and $forbiddenlist |
||
59 | !endif |
||
60 | |||
23 | reyssat | 61 | !if $gotlist=$empty |
12413 | bpr | 62 | error=empty_file |
63 | !exit |
||
23 | reyssat | 64 | !endif |
65 | |||
6108 | czzmrn | 66 | serial=!record 0 of wimshome/$new/serial |
23 | reyssat | 67 | serial=!word 1 of $serial |
68 | |||
69 | !readdef wimshome/log/classes/$wims_class/neighbors |