File:  [LON-CAPA] / loncom / html / adm / MathJax / commands
Revision 1.10: download - view: text, annotated - select for diffs
Sun Jul 23 18:10:45 2023 UTC (9 months, 3 weeks ago) by raeburn
Branches: MAIN
CVS tags: version_2_12_X, HEAD
- MathJax 2.7.9

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.7.9.zip
  mv $mathjaxdir/MathJax-2.7.9/* $mathjaxdir/.
  rm -r $mathjaxdir/MathJax-2.7.9
  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>