File:  [LON-CAPA] / loncom / html / adm / ckeditor / commands
Revision 1.12: download - view: text, annotated - select for diffs
Fri Jun 14 19:12:51 2024 UTC (2 weeks, 2 days ago) by raeburn
Branches: MAIN
CVS tags: version_2_12_X, version_2_11_X, HEAD
- 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).

path=`pwd`
htmldir='/home/httpd/html'
currversion=0.0
ckeditordir="$htmldir/ckeditor"
if [ -e $ckeditordir ]
then
  if [ -e "$ckeditordir/VERSION" ]
  then
      currversion=`cat $ckeditordir/VERSION`
  fi
fi
newversion=`cat VERSION`
arrnewversion=(${newversion//./ })
arrcurrversion=(${currversion//./ })
comparison=`echo "${arrnewversion[0]} > ${arrcurrversion[0]}" | bc`
if [ $comparison -eq 0 ]
then
  comparison=`echo "${arrnewversion[0]} < ${arrcurrversion[0]}" | bc`
  if [ $comparison -eq 0 ]
  then
    comparison=`echo "${arrnewversion[1]} > ${arrcurrversion[1]}" | bc`
  fi
fi
if [ $comparison -gt 0 ]
then
  if [ -e $ckeditordir ]
  then
    rm -rf $ckeditordir
  fi
  cd $htmldir
  echo $path/ckeditor_4.22.1.tar.gz
  tar -zxf $path/ckeditor_4.22.1.tar.gz
  cp -r $path/plugins/lcm ckeditor/plugins/
  cp -r $path/plugins/chem ckeditor/plugins/
  cp $path/VERSION ckeditor/VERSION
  cp $path/loncapaconfig.js ckeditor/loncapaconfig.js
  chown -R www:www ckeditor
fi
if [ -e "$htmldir/fckeditor" ]
then
    rm -rf $htmldir/fckeditor
fi
if [ -e "$htmldir/htmlarea" ]
then
    rm -rf $htmldir/htmlarea
fi
if  [ -e "$htmldir/adm/ckeditor" ]
then
    rm -rf $htmldir/adm/ckeditor
fi

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>