Subversion Repositories wimsdev

Rev

Rev 16233 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 16233 Rev 16347
Line 42... Line 42...
42
    # test if statut of sheet is non 0
42
    # test if statut of sheet is non 0
43
    statut=`awk -v no="$num" 'BEGIN{cpt=0;} {a=substr($0,1,1); if(a==":")cpt++; if(cpt==no){print($0);exit;}}' .sheets`;
43
    statut=`awk -v no="$num" 'BEGIN{cpt=0;} {a=substr($0,1,1); if(a==":")cpt++; if(cpt==no){print($0);exit;}}' .sheets`;
44
    if [ "$statut" != ":0" ]; then
44
    if [ "$statut" != ":0" ]; then
45
     entete=`awk '{a=substr($0,1,1); if(a==":")exit; else print($0);}' $sh`;
45
     entete=`awk '{a=substr($0,1,1); if(a==":")exit; else print($0);}' $sh`;
46
     namesh=${sh##.};
46
     namesh=${sh##.};
47
     if [ -z `grep -r :classes/ $sh` ]; then
47
     if [ -z "`grep -r :classes/ $sh`" ]; then
48
      if [ -n "$entete" ]; then
48
      if [ -n "$entete" ]; then
49
        #First case : information is in file .sheet$i : keep it (but not title and desc)
49
        #First case : information is in file .sheet$i : keep it (but not title and desc)
50
        # echo "$sh : direct copy";
50
        # echo "$sh : direct copy";
51
        title=`awk -v no="$num" 'BEGIN{cpt=0;l=0;} {a=substr($0,1,1); if(a==":")cpt++; if(cpt==no){l++;if(l==3){print($0);exit;}} }' .sheets`;
51
        title=`awk -v no="$num" 'BEGIN{cpt=0;l=0;} {a=substr($0,1,1); if(a==":")cpt++; if(cpt==no){l++;if(l==3){print($0);exit;}} }' .sheets`;
52
        desc=`awk -v no="$num" 'BEGIN{cpt=0;l=0;} {a=substr($0,1,1); if(a==":")cpt++; if(cpt==no){l++;if(l==4){print($0);exit;}} }' .sheets`;
52
        desc=`awk -v no="$num" 'BEGIN{cpt=0;l=0;} {a=substr($0,1,1); if(a==":")cpt++; if(cpt==no){l++;if(l==4){print($0);exit;}} }' .sheets`;