Return to commands CVS log | Up to [LON-CAPA] / loncom / html / adm / ckeditor |
- Modify change in rev 1.10. For new installations (i.e., with no current version of ckeditor) set currversion to 0.0 (same as jsme and geogebra).
1: path=`pwd` 2: htmldir='/home/httpd/html' 3: currversion=0.0 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` 13: arrnewversion=(${newversion//./ }) 14: arrcurrversion=(${currversion//./ }) 15: comparison=`echo "${arrnewversion[0]} > ${arrcurrversion[0]}" | bc` 16: if [ $comparison -eq 0 ] 17: then 18: comparison=`echo "${arrnewversion[0]} < ${arrcurrversion[0]}" | bc` 19: if [ $comparison -eq 0 ] 20: then 21: comparison=`echo "${arrnewversion[1]} > ${arrcurrversion[1]}" | bc` 22: fi 23: fi 24: if [ $comparison -gt 0 ] 25: then 26: if [ -e $ckeditordir ] 27: then 28: rm -rf $ckeditordir 29: fi 30: cd $htmldir 31: echo $path/ckeditor_4.22.1.tar.gz 32: tar -zxf $path/ckeditor_4.22.1.tar.gz 33: cp -r $path/plugins/lcm ckeditor/plugins/ 34: cp -r $path/plugins/chem ckeditor/plugins/ 35: cp $path/VERSION ckeditor/VERSION 36: cp $path/loncapaconfig.js ckeditor/loncapaconfig.js 37: chown -R www:www ckeditor 38: fi 39: if [ -e "$htmldir/fckeditor" ] 40: then 41: rm -rf $htmldir/fckeditor 42: fi 43: if [ -e "$htmldir/htmlarea" ] 44: then 45: rm -rf $htmldir/htmlarea 46: fi 47: if [ -e "$htmldir/adm/ckeditor" ] 48: then 49: rm -rf $htmldir/adm/ckeditor 50: fi