Rev 11170 | Rev 14627 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
11170 | bpr | 1 | |
2 | !read scripts/getindex $mod |
||
3 | !if $title=$empty |
||
4 | job=modname |
||
5 | !changeto modname.proc |
||
6 | !endif |
||
7 | !if $fnewname=$fname |
||
8 | error=nochange |
||
9 | !exit |
||
10 | !endif |
||
11 | allowchar=/.-_$alnum |
||
12 | fname=!word 1 of $fname |
||
13 | fname=!text select $allowchar in $fname |
||
14 | c=!char 1 of $fname |
||
15 | !if $c=. or $c=/ or .. isin $fname |
||
16 | !goto badname |
||
17 | !endif |
||
18 | !read files |
||
19 | !if $fname notitemof $files |
||
20 | :badname |
||
21 | error=bad_fname |
||
22 | lastfname=$fname |
||
23 | job=flist |
||
24 | !changeto flist.proc |
||
25 | !endif |
||
26 | allowchar=/._$alnum |
||
27 | fnewname=!word 1 of $fnewname |
||
28 | fnewname=!text select $allowchar in $fnewname |
||
29 | c=!char 1 of $fnewname |
||
30 | !if $c=. or $c=/ or .. isin $fnewname |
||
31 | !goto badname |
||
32 | !endif |
||
33 | !read files |
||
34 | !if $fnewname isitemof $files |
||
35 | error=bad_fname_already |
||
36 | lastfname=$fname |
||
37 | job=flist |
||
38 | !changeto flist.proc |
||
39 | !endif |
||
40 | !if $fnewname=$empty |
||
41 | job=flist |
||
42 | !changeto $job.proc |
||
43 | !endif |
||
44 | |||
45 | moddir=modules/devel/$auth_login/$mod |
||
46 | !if ../src/ isin ../$fnewname |
||
47 | mkdef=src2def 2>/dev/null |
||
48 | !else |
||
49 | !reset mkdef |
||
50 | !endif |
||
51 | test=!sh cd $moddir; ls |
||
11451 | bpr | 52 | |
11170 | bpr | 53 | !sh cd $moddir\ |
54 | mkdir -p .deleted\ |
||
55 | cp $fname .deleted\ |
||
56 | mv $fname $fnewname\ |
||
57 | $mkdef |
||
11451 | bpr | 58 | !if .oef$ $ isin $(fname)$ $ |
59 | im=!replace internal src by images in $fname |
||
60 | im=!replace internal .oef by in $im |
||
61 | testim=yes |
||
62 | im=!replace internal _src by images in _$fname |
||
63 | im=!replace internal .oef by in $im |
||
64 | fname_=!replace internal / by , in $fnewname |
||
65 | imnew=!replace internal .oef by in images/$(fname_[2]) |
||
66 | !sh cd $moddir\ |
||
67 | if [ -d $im ]; then mv $im $imnew; fi; |
||
68 | !endif |
||
69 | wims_module_log=move $mod/$fname |