Subversion Repositories wimsdev

Rev

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


MAX=500

c=!char 1 of $fsdir
!if $c=/
  fsdir=!char 2 to -1 of $fsdir
!endif
relocatable=log log/classes log/forums log/account log/referer\
  chroot backup other s2 sessions tmp tmp/sessions\
  src public_html/w public_html/themes/local\
  public_html/modules/local public_html/modules/devel\
  public_html/com\
  public_html/modules/adm/local public_html/modules/priv\
  public_html/modules/adm/private\
  w www
relocatable=!words2items $relocatable
!read dir-modifiable
modifok=no
!for d in $modifiable
  !if ../$d/ isin ../$fsdir/
    modifok=yes
    break
  !endif
!next d

!if $job2=add
  job2=
  !if $wims_deposit!=$empty and $modifok=yes and / notin $wims_deposit
    !sh cd $wims_home\
      [ -e $fsdir/$wims_deposit ] && [ ! -f $fsdir/$wims_deposit ] && exit\
      cp -f $wims_sesdir/user-deposit $fsdir/$wims_deposit
  !endif
!endif

base=!replace internal /public_html???? by $ in $httpd_PWD????
fsdir=!word 1 of $fsdir
!if $fsdir!=$empty
  dir=$base/$fsdir
  dd=!translate internal / to , in $fsdir
  dd=!nonempty items $dd
!else
  dir=$base
!endif

!if $fsdir isitemof $relocatable
  follow=-follow
!else
  follow=
!endif

dirs=!sh find $dir $follow -type d -maxdepth 1 | head -$MAX
files=!sh find $dir $follow -type f -maxdepth 1 | head -$MAX
links=!sh find $dir -type l -maxdepth 1 | head -$MAX
dirs=!replace internal $dir/ by $ in $dirs
dirs=!replace word $dir by $ in $dirs
files=!replace internal $dir/ by $ in $files
links=!replace internal $dir/ by $ in $links
dirs=!sort words $dirs
files=!sort words $files
links=!sort words $links
dirs=!words2items $dirs
files=!words2items $files
links=!words2items $links
link1=!listintersect $links and $relocatable
!if $link1!=$empty
 dirs=!append item $link1 to $dirs
 links=!listcomplement $link1 in $links
!endif

dirs=!sort items $dirs
files=!sort items $files
links=!sort items $links