Subversion Repositories wimsdev

Rev

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

Rev Author Line No. Line
23 reyssat 1
!if $abandon!=$empty
14414 bpr 2
  abandon=
3
  job=flist
4
  !changeto $job.proc
23 reyssat 5
!endif
6
 
15280 obado 7
!read scripts/getindex.proc $mod
23 reyssat 8
!if $title=$empty
12498 bpr 9
  job=modname
10
  !changeto modname.proc
23 reyssat 11
!endif
12
 
13
allowchar=/.-_$alnum
16243 bpr 14
allowcharres=/._$alnum
23 reyssat 15
fname=!word 1 of $fname
16
fname=!text select $allowchar in $fname
17
c=!char 1 of $fname
18
!if $c=. or $c=/
14348 bpr 19
  !goto badname
23 reyssat 20
!endif
15280 obado 21
!read files.proc
23 reyssat 22
!if $fname notitemof $files
16243 bpr 23
  fnametest=!text select $allowcharres in $fname
24
  !if $fname!=$fnametest
25
    !goto badname
26
  !endif
12498 bpr 27
  !if / notin $fname and .. notin $fname
28
    test=!filelist $devdir/$mod/$fname
29
    !if $test!=$empty
30
      :badname
31
      error=bad_fname
32
      lastfname=$fname
33
      job=flist
34
      !changeto flist.proc
35
    !endif
36
  !else
37
    !if (..help/ notin ..$fname and ..src/ notin ..$fname and ..lang/ notin ..$fname) \
14348 bpr 38
        or .. isin $fname
12498 bpr 39
      !goto badname
40
    !endif
23 reyssat 41
  !endif
42
!endif
43
 
44
!if $fname=$empty
12498 bpr 45
  job=flist
46
  !changeto $job.proc
23 reyssat 47
!endif
48
 
49
!if $job=edfile and $register!=$empty
12498 bpr 50
  !if $register=file_mode
51
    test=!exec ftype $wims_home/$wims_sesdir/user-deposit
52
    !if $test iswordof binary
53
      error=binary_file
54
      !exit
55
    !endif
23 reyssat 56
  !endif
12498 bpr 57
  register=
58
  !if $fname=filedesc
59
    test=!sh grep '!' $wims_home/$wims_sesdir/user-deposit
17143 obado 60
    !if ! isin $test
12498 bpr 61
      error=illegal_filedesc
62
      !exit
63
    !endif
23 reyssat 64
  !endif
17143 obado 65
  makeout=!sh module=$devdir/$mod\
12498 bpr 66
   test=`echo $fname | grep -E '^(src/|help/)'`\
67
   if [ ! -z "$$test" ]; then mkdir -p $$module/`dirname $fname`; fi\
68
   cat $wims_home/$wims_sesdir/user-deposit >$$module/$fname\
69
   if [ ! -z "$$test" ]; then\
70
    cd $$module; src2def\
71
   fi
72
  !if ERROR isin $makeout
73
    makeerror=$makeout
74
  !endif
75
  wims_module_log=edit $mod/$fname
23 reyssat 76
!endif
77
 
15280 obado 78
content=!mexec scripts/fileread.sh