Subversion Repositories wimsdev

Rev

Rev 2497 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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