File:  [LON-CAPA] / loncom / html / adm / MathJax / commands
Revision 1.3: download - view: text, annotated - select for diffs
Thu Jan 10 05:36:15 2013 UTC (11 years, 8 months ago) by raeburn
Branches: MAIN
CVS tags: HEAD
- Improve robustness by not relying on argument in script call in loncaapfiles.lpml - For rich text editor (ckeditor) do some clean up of old editors -- fckeditor
  and htmlarea, if installing on LON-CAPA server with long history
- Add sleep to avoid error occasionally seen when running ./UPDATE
- Eliminate warnings about missing directories
- Include FONTSVERSION for jsMath Fonts and only unzip fonts .zip file if newer
  than FONTSVERSION.

currversion=0.0
mathjaxdir='/home/httpd/html/adm/MathJax'
if [ -e $mathjaxdir ]
then
  if [ -e "$mathjaxdir/VERSION" ]
  then
      currversion=`cat $mathjaxdir/VERSION`
  fi
fi
newversion=`cat VERSION`
comparison=`echo "$newversion > $currversion" | bc`
if [ $comparison -gt 0 ]
then
  if [ -e $mathjaxdir ]
  then
    rm -rf $mathjaxdir
  fi
  unzip -q -o -d $mathjaxdir mathjax-MathJax-v2.0-20-g07669ac.zip
  mv $mathjaxdir/mathjax-MathJax-07669ac/* $mathjaxdir/.
  rm -r $mathjaxdir/mathjax-MathJax-07669ac
  cp VERSION $mathjaxdir/VERSION
  chown -R www:www $mathjaxdir
  find $mathjaxdir -type d -exec chmod u=rwx,go-rwx {} \;
fi

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