Subversion Repositories wimsdev

Rev

Rev 2497 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
23 reyssat 1
 
2
MAX=500
3
 
4
c=!char 1 of $fsdir
5
!if $c=/
14348 bpr 6
  fsdir=!char 2 to -1 of $fsdir
23 reyssat 7
!endif
8
relocatable=log log/classes log/forums log/account log/referer\
14348 bpr 9
  chroot backup other s2 sessions tmp tmp/sessions\
10
  src public_html/w public_html/themes/local\
11
  public_html/modules/local public_html/modules/devel\
12
  public_html/com\
13
  public_html/modules/adm/local public_html/modules/priv\
14
  public_html/modules/adm/private\
15
  w www
23 reyssat 16
relocatable=!words2items $relocatable
17
!read dir-modifiable
18
modifok=no
19
!for d in $modifiable
14348 bpr 20
  !if ../$d/ isin ../$fsdir/
21
    modifok=yes
22
    break
23
  !endif
23 reyssat 24
!next d
25
 
26
!if $job2=add
14348 bpr 27
  job2=
28
  !if $wims_deposit!=$empty and $modifok=yes and / notin $wims_deposit
29
    !sh cd $wims_home\
30
      [ -e $fsdir/$wims_deposit ] && [ ! -f $fsdir/$wims_deposit ] && exit\
31
      cp -f $wims_sesdir/user-deposit $fsdir/$wims_deposit
32
  !endif
23 reyssat 33
!endif
34
 
35
base=!replace internal /public_html???? by $ in $httpd_PWD????
36
fsdir=!word 1 of $fsdir
37
!if $fsdir!=$empty
14348 bpr 38
  dir=$base/$fsdir
39
  dd=!translate internal / to , in $fsdir
40
  dd=!nonempty items $dd
23 reyssat 41
!else
14348 bpr 42
  dir=$base
23 reyssat 43
!endif
44
 
45
!if $fsdir isitemof $relocatable
14348 bpr 46
  follow=-follow
23 reyssat 47
!else
14348 bpr 48
  follow=
23 reyssat 49
!endif
50
 
51
dirs=!sh find $dir $follow -type d -maxdepth 1 | head -$MAX
52
files=!sh find $dir $follow -type f -maxdepth 1 | head -$MAX
53
links=!sh find $dir -type l -maxdepth 1 | head -$MAX
54
dirs=!replace internal $dir/ by $ in $dirs
55
dirs=!replace word $dir by $ in $dirs
56
files=!replace internal $dir/ by $ in $files
57
links=!replace internal $dir/ by $ in $links
58
dirs=!sort words $dirs
59
files=!sort words $files
60
links=!sort words $links
61
dirs=!words2items $dirs
62
files=!words2items $files
63
links=!words2items $links
64
link1=!listintersect $links and $relocatable
65
!if $link1!=$empty
66
 dirs=!append item $link1 to $dirs
67
 links=!listcomplement $link1 in $links
68
!endif
69
 
70
dirs=!sort items $dirs
71
files=!sort items $files
72
links=!sort items $links