File:  [LON-CAPA] / loncom / html / adm / jsMath / commands
Revision 1.6: download - view: text, annotated - select for diffs
Fri Jan 11 15:27:23 2013 UTC (11 years, 4 months ago) by raeburn
Branches: MAIN
CVS tags: version_2_12_X, version_2_11_X, version_2_11_4_uiuc, version_2_11_4_msu, version_2_11_4, version_2_11_3_uiuc, version_2_11_3_msu, version_2_11_3, version_2_11_2_uiuc, version_2_11_2_msu, version_2_11_2_educog, version_2_11_2, version_2_11_1, version_2_11_0_RC3, version_2_11_0_RC2, version_2_11_0_RC1, version_2_11_0, HEAD
- Fix typos in rev. 1.5
- Only remove jsMath/fonts directory if newer fonts available.

currfontsversion=0.0
admdir='/home/httpd/html/adm'
jsmathdir="$admdir/jsMath"
if [ -e $jsmathdir ]
then
    if [ -e "$jsmathdir/FONTSVERSION" ]
    then
        currfontsversion=`cat $jsmathdir/FONTSVERSION`
    fi
fi
newfontsversion=`cat FONTSVERSION`
comparison=`echo "$newfontsversion > $currfontsversion" | bc`
if [ $comparison -gt 0 ]
then
  if [ -e $jsmathdir ]
  then
      if [ -e "$jsmathdir/fonts" ] 
      then
          rm -rf $jsmathdir/fonts
      fi
  fi
  unzip -q -o -d $admdir jsMath-fonts-1.3.zip
  cp FONTSVERSION $jsmathdir/FONTSVERSION
  chown -R www:www $jsmathdir
  find $jsmathdir -type d -exec chmod u=rwx,go-rwx {} \;
  sleep 1
fi


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