Subversion Repositories wimsdev

Rev

Rev 5163 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5163 Rev 5165
Line 23... Line 23...
23
 !distribute words $cn_status into cn_status,cnr_code
23
 !distribute words $cn_status into cn_status,cnr_code
24
 !if $cn_status=OK and $cn_method iswordof authuser addclass
24
 !if $cn_status=OK and $cn_method iswordof authuser addclass
25
  cn_data=!word 1 of $cn_data
25
  cn_data=!word 1 of $cn_data
26
 !endif
26
 !endif
27
!else
27
!else
-
 
28
 !if $cn_method iswordof getcsv
28
 tmpdir=$wims_home/tmp/sessions/$wims_session
29
  tmpdir=$wims_home/tmp/sessions/$wims_session
29
 cn_data=!sh export wims_exec_parm="$URL" ; \
30
  cn_data=!sh export wims_exec_parm="$URL" ; \
30
    bin/webget > $tmpdir/getdata.gz ; gunzip -c -f $tmpdir/getdata
31
    bin/webget > $tmpdir/getdata.gz ; gunzip -c -f $tmpdir/getdata
31
!sh gunzip -c -f $tmpdir/getdata> $wims_home/$wims_sesdir/webget.data
32
  !sh gunzip -c -f $tmpdir/getdata> $wims_home/$wims_sesdir/webget.data
32
!! these lines used to work when getcsv returned the OK+ctl
33
!! these lines used to work when getcsv returned the OK+ctl
33
!! it does not behave like that any longer (except for ERROR??)
34
!! it does not behave like that any longer (except for ERRORS??)
34
 cn_status=!sh cd $tmpdir >/dev/null;\
-
 
35
    zcat getdata.gz | head -1;\
-
 
36
    zcat getdata.gz | tail --lines=+2 >webget.data 2>/dev/null 
-
 
37
!! webget_output=webget.out
-
 
38
!! cn_status=!sh cd ../$wims_sesdir >/dev/null\
35
  cn_status=!sh head -1 $wims_home/$wims_sesdir/webget.data
39
!!	head -1 webget.out\
-
 
40
!!	tail +2 webget.out >webget.data 2>/dev/null
-
 
41
 !distribute words $cn_status into cn_status,cnr_code
36
  !distribute words $cn_status into cn_status,cnr_code
42
 !if $cn_status issametext ERROR
37
  !if $cn_status issametext ERROR
43
  cn_data=!record 0 of wimshome/$wims_sesdir/webget.data
38
   cn_data=!record 0 of wimshome/$wims_sesdir/webget.data
44
 !endif
39
  !endif
45
!! if getcsv, we are ok if the first word is "login" (CHECK THIS)
40
!! if getcsv, we are ok if the first word is "login" (FIXME: CHECK THIS)
46
 !if login isitemof $cn_status
41
  !if login isitemof $cn_status
-
 
42
   cn_status=OK
-
 
43
   cn_code=$cnr_code
-
 
44
  !endif
-
 
45
 !else
-
 
46
!! FIXME: the only remaining should be getclasstgz?? how about getlog getclassfile
-
 
47
  tmpdir=$wims_home/tmp/sessions/$wims_session
-
 
48
  cn_data=!sh export wims_exec_parm="$URL" ; \
-
 
49
    bin/webget > $wims_home/$wims_sesdir/webget.data 
-
 
50
!! FIXME: need to insert some check!!
47
  cn_status=OK
51
  cn_status=OK
48
  cn_code=$cnr_code
52
  cn_code=$cnr_code
49
 !endif
53
 !endif
50
!endif
54
!endif
51
 
55