version 1.1, 2011/12/06 16:23:30
|
version 1.7, 2016/08/05 19:50:59
|
Line 1
|
Line 1
|
rm -rf $1/ |
currversion=0.0 |
unzip -q -o -d $1 mathjax-MathJax-v1.1a-0-g1697387.zip |
mathjaxdir='/home/httpd/html/adm/MathJax' |
mv $1/mathjax-MathJax-f5cd294/* $1/. |
if [ -e $mathjaxdir ] |
rm -r $1/mathjax-MathJax-f5cd294 |
then |
chown -R www:www $1 |
if [ -e "$mathjaxdir/VERSION" ] |
find $1 -type d -exec chmod u=rwx,go-rwx {} \; |
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.6.1.zip |
|
mv $mathjaxdir/MathJax-2.6.1/* $mathjaxdir/. |
|
rm -r $mathjaxdir/MathJax-2.6.1 |
|
cp VERSION $mathjaxdir/VERSION |
|
chown -R www:www $mathjaxdir |
|
find $mathjaxdir -type d -exec chmod u=rwx,go-rwx {} \; |
|
fi |