Rev 3028 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
23 | reyssat | 1 | !if $wims_deposit=$empty |
2 | mode=prep |
||
3 | !exit |
||
4 | !endif |
||
5 | |||
6 | wims_deposit=!word 1 of $wims_deposit |
||
7 | deptest=!text select -.~_$alnum in $wims_deposit |
||
8 | !if / isin $wims_deposit or .. isin $wims_deposit or \ |
||
9 | ~~ isin $wims_deposit or \ |
||
10 | $wims_deposit!=$deptest or \ |
||
11 | .tgz/ notin $wims_deposit/ |
||
12 | mode=bad_fname |
||
13 | !exit |
||
14 | !endif |
||
15 | |||
16 | !if ../modtool- isin ../$wims_deposit |
||
17 | nameverif=!replace internal ../modtool- by in ../$wims_deposit |
||
18 | restored=$nameverif |
||
19 | !else |
||
20 | nameverif=!translate internal ~ to , in $wims_deposit |
||
21 | vcnt=!itemcnt $nameverif |
||
22 | !distribute items $nameverif into t1,t2,nameverif |
||
23 | !if $vcnt!=3 or $t1 notitemof $zonelist |
||
24 | mode=bad_fname |
||
25 | !exit |
||
26 | !endif |
||
27 | restored=$wims_deposit |
||
28 | !endif |
||
29 | nameverif=!replace internal .tgz/ by in $nameverif/ |
||
30 | restored=!replace internal .tgz/ by in $restored/ |
||
31 | |||
32 | ftest=!sh cd $wims_home/$wims_sesdir\ |
||
33 | rm -fR deptest\ |
||
34 | mkdir -p deptest\ |
||
35 | mv -f user-deposit deptest/$wims_deposit\ |
||
36 | cd deptest\ |
||
37 | if [ -f $wims_deposit ]; then\ |
||
3028 | bpr | 38 | tar -xzf $wims_deposit --exclude \._*\ |
23 | reyssat | 39 | rm -fR $wims_deposit\ |
40 | ls \ |
||
41 | fi |
||
42 | |||
43 | ftest=!word 1 of $ftest |
||
44 | ftcnt=!charcnt $ftest |
||
45 | !if $ftcnt<1 or $ftcnt>40 or $ftest!=$nameverif |
||
46 | mode=bad_arch |
||
47 | !exit |
||
48 | !endif |
||
49 | |||
50 | ftest2=!getdef description in wimshome/$wims_sesdir/deptest/$ftest/INDEX |
||
51 | ftest=!getdef title in wimshome/$wims_sesdir/deptest/$ftest/INDEX |
||
52 | |||
53 | !if $ftest=$empty |
||
54 | mode=bad_arch |
||
55 | !exit |
||
56 | !endif |
||
57 | |||
58 | test=!sh cd $wims_home/$wims_sesdir/deptest\ |
||
59 | rm -f mkindex src/Makefile src/cpp/Makefile\ |
||
60 | chmod -R og-w *\ |
||
61 | find . -type f -exec chmod og-x '{}' \;\ |
||
62 | find . ! \( -type f -o -type d \) -print |
||
63 | |||
64 | !if $test!=$empty |
||
65 | !sh rm -fR $wims_home/$wims_sesdir/deptest/$nameverif |
||
66 | mode=illegal |
||
67 | !exit |
||
68 | !endif |
||
69 | |||
70 | !if $confirm=diffcheck |
||
71 | mode=diffcheck |
||
4875 | bpr | 72 | category=!module category $restored |
73 | |||
74 | !if oef isitemof $category |
||
75 | exclude=--exclude def |
||
76 | !endif |
||
77 | !if document isitemof $category |
||
78 | exclude=--exclude '*.def' |
||
79 | !endif |
||
80 | |||
23 | reyssat | 81 | diff=!sh cd $wims_home\ |
4875 | bpr | 82 | diff -r $exclude --new-file $wims_sesdir/deptest/$nameverif public_html/modules/devel/$auth_login/$restored | sed 's/\&/\&/g;s/</\</g;s/\$$/\$/g' | tail -c 15000 |
23 | reyssat | 83 | diffcnt=!charcnt $diff |
4875 | bpr | 84 | !if $diffcnt>19500 |
85 | diff1=MANY |
||
86 | diff =!char 1 to 19000 of $diff |
||
87 | !else |
||
88 | diff = !replace internal diff -r $exclude --new-file by in $diff |
||
89 | !if $diff !=$empty |
||
90 | diff=diff -r $exclude --new-file\ |
||
91 | $diff |
||
92 | !endif |
||
93 | !endif |
||
23 | reyssat | 94 | !exit |
95 | !endif |
||
96 | |||
97 | !sh rm -fR $devdir/$restored\ |
||
98 | mkdir -p $devdir\ |
||
99 | mv -f $wims_home/$wims_sesdir/deptest/$nameverif $devdir/$restored\ |
||
100 | cd $devdir/$restored; src2def |
||
101 |