Annotation of loncom/html/adm/ckeditor/commands, revision 1.13
1.1 faziophi 1: path=`pwd`
1.4 raeburn 2: htmldir='/home/httpd/html'
1.13 ! raeburn 3: currversion=0.0.0
1.6 raeburn 4: ckeditordir="$htmldir/ckeditor"
5: if [ -e $ckeditordir ]
6: then
7: if [ -e "$ckeditordir/VERSION" ]
8: then
9: currversion=`cat $ckeditordir/VERSION`
10: fi
11: fi
12: newversion=`cat VERSION`
1.11 raeburn 13: arrnewversion=(${newversion//./ })
1.13 ! raeburn 14: arrnewlength=${#arrnewversion[@]}
! 15: arrnewcomp=`echo "$arrnewlength < 3" | bc`
! 16: if [ $arrnewcomp -gt 0 ]
! 17: then
! 18: arrnewversion[2]=0;
! 19: fi
1.11 raeburn 20: arrcurrversion=(${currversion//./ })
1.13 ! raeburn 21: arrcurrlength=${#arrcurrversion[@]}
! 22: arrcurrcomp=`echo "$arrcurrlength < 3" | bc`
! 23: if [ $arrcurrcomp -gt 0 ]
! 24: then
! 25: arrcurrversion[2]=0;
! 26: fi
1.11 raeburn 27: comparison=`echo "${arrnewversion[0]} > ${arrcurrversion[0]}" | bc`
28: if [ $comparison -eq 0 ]
29: then
30: comparison=`echo "${arrnewversion[0]} < ${arrcurrversion[0]}" | bc`
31: if [ $comparison -eq 0 ]
32: then
33: comparison=`echo "${arrnewversion[1]} > ${arrcurrversion[1]}" | bc`
1.13 ! raeburn 34: if [ $comparison -eq 0 ]
! 35: then
! 36: comparison=`echo "${arrnewversion[1]} < ${arrcurrversion[1]}" | bc`
! 37: if [ $comparison -eq 0 ]
! 38: then
! 39: comparison=`echo "${arrnewversion[2]} > ${arrcurrversion[2]}" | bc`
! 40: fi
! 41: fi
1.11 raeburn 42: fi
43: fi
1.6 raeburn 44: if [ $comparison -gt 0 ]
45: then
46: if [ -e $ckeditordir ]
47: then
48: rm -rf $ckeditordir
49: fi
50: cd $htmldir
1.11 raeburn 51: echo $path/ckeditor_4.22.1.tar.gz
52: tar -zxf $path/ckeditor_4.22.1.tar.gz
1.13 ! raeburn 53: echo $path/a11ychecker_1.1.1.tar.gz
! 54: tar -zxf $path/a11ychecker_1.1.1.tar.gz
! 55: mv a11ychecker ckeditor/plugins/
! 56: echo $path/balloonpanel_4.22.1.tar.gz
! 57: tar -zxf $path/balloonpanel_4.22.1.tar.gz
! 58: mv balloonpanel ckeditor/plugins/
1.7 damieng 59: cp -r $path/plugins/lcm ckeditor/plugins/
1.8 damieng 60: cp -r $path/plugins/chem ckeditor/plugins/
1.6 raeburn 61: cp $path/VERSION ckeditor/VERSION
62: cp $path/loncapaconfig.js ckeditor/loncapaconfig.js
63: chown -R www:www ckeditor
64: fi
1.4 raeburn 65: if [ -e "$htmldir/fckeditor" ]
66: then
67: rm -rf $htmldir/fckeditor
68: fi
69: if [ -e "$htmldir/htmlarea" ]
70: then
71: rm -rf $htmldir/htmlarea
72: fi
1.6 raeburn 73: if [ -e "$htmldir/adm/ckeditor" ]
74: then
75: rm -rf $htmldir/adm/ckeditor
76: fi
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>