Subversion Repositories wimsdev

Rev

Go to most recent revision | Details | 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=/
6
 fsdir=!char 2 to -1 of $fsdir
7
!endif
8
relocatable=log log/classes log/forums log/account log/referer\
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
16
relocatable=!words2items $relocatable
17
!read dir-modifiable
18
modifok=no
19
!for d in $modifiable
20
 !if ../$d/ isin ../$fsdir/
21
  modifok=yes
22
  break
23
 !endif
24
!next d
25
 
26
!if $job2=add
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
33
!endif
34
 
35
base=!replace internal /public_html???? by $ in $httpd_PWD????
36
fsdir=!word 1 of $fsdir
37
!if $fsdir!=$empty
38
 dir=$base/$fsdir
39
 dd=!translate internal / to , in $fsdir
40
 dd=!nonempty items $dd
41
!else
42
 dir=$base
43
!endif
44
 
45
!if $fsdir isitemof $relocatable
46
 follow=-follow
47
!else
48
 follow=
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
73