Subversion Repositories wimsdev

Rev

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

Rev 12080 Rev 12413
Line 1... Line 1...
1
!if $job2=restore
1
!if $job2=restore
2
 !goto next
2
  !goto next
3
!endif
3
!endif
4
wims_deposit=!word 1 of $wims_deposit
4
wims_deposit=!word 1 of $wims_deposit
5
selection=
5
selection=
6
gotlist=
6
gotlist=
7
 
7
 
8
!if . notin $wims_deposit or / isin $wims_deposit or .. isin $wims_deposit
8
!if . notin $wims_deposit or / isin $wims_deposit or .. isin $wims_deposit
9
 error=bad_file
9
  error=bad_file
10
 !exit
10
  !exit
11
!endif
11
!endif
12
 
12
 
13
t=!translate . to $ $ in $wims_deposit
13
t=!translate . to $ $ in $wims_deposit
14
format=!word 2 to -1 of $t
14
format=!word 2 to -1 of $t
15
format=!translate $ $ to . in $format
15
format=!translate $ $ to . in $format
16
!if $format notwordof tgz tar.gz zip
16
!if $format notwordof tgz tar.gz zip
17
 error=bad_file
17
  error=bad_file
18
 !exit
18
  !exit
19
!endif
19
!endif
20
 
20
 
21
!mexec arch/decompress.sh
21
!mexec arch/decompress.sh
22
:next
22
:next
23
new=$wims_sesdir/upload/class
23
new=$wims_sesdir/upload/class
24
old=log/classes/$wims_class
24
old=log/classes/$wims_class
25
v=!record 0 of wimshome/$new/version
25
v=!record 0 of wimshome/$new/version
26
v=!trim $v
26
v=!trim $v
27
!!version <=4 for classes
27
!!version <=4 for classes
28
!if $v=$empty or $v<4
28
!if $v=$empty or $v<4
29
 error=bad_file
29
  error=bad_file
30
 !exit
30
  !exit
31
!endif
31
!endif
32
 
32
 
33
!for type in new,old
33
!for type in new,old
34
 !read scripts/reccnt.proc $type $($type)
34
  !read scripts/reccnt.proc $type $($type)
35
 t=!defof class_defined in $($type)/.def
35
  t=!defof class_defined in $($type)/.def
36
 !if $t=yes
36
  !if $t=yes
37
  $(type)_defcnt=1
37
    $(type)_defcnt=1
38
 !else
38
  !else
39
  $(type)_defcnt=0
39
    $(type)_defcnt=0
40
 !endif
40
  !endif
41
!next type
41
!next type
42
new_reccnt=$[$new_reccnt+$new_defcnt+$new_supcnt]
42
new_reccnt=$[$new_reccnt+$new_defcnt+$new_supcnt]
43
 
43
 
44
!for rec in $reclist
44
!for rec in $reclist
45
 !if $(new_$(rec)cnt)>0
45
  !if $(new_$(rec)cnt)>0
46
  gotlist=!append item $rec to $gotlist
46
    gotlist=!append item $rec to $gotlist
47
 !endif
47
  !endif
48
!next rec
48
!next rec
49
!if $gotlist=$empty
49
!if $gotlist=$empty
50
 error=empty_file
50
  error=empty_file
51
 !exit
51
  !exit
52
!endif
52
!endif
53
 
53
 
54
serial=!record 0 of wimshome/$new/serial
54
serial=!record 0 of wimshome/$new/serial
55
serial=!word 1 of $serial
55
serial=!word 1 of $serial
56
 
56
 
57
!readdef wimshome/log/classes/$wims_class/neighbors
57
!readdef wimshome/log/classes/$wims_class/neighbors
58
 
-