version 1.2, 2012/05/24 01:35:55
|
version 1.3, 2013/01/10 05:36:15
|
Line 1
|
Line 1
|
currversion=0.0 |
currversion=0.0 |
if [ -e "$1/VERSION" ] |
mathjaxdir='/home/httpd/html/adm/MathJax' |
|
if [ -e $mathjaxdir ] |
then |
then |
currversion=`cat $1/VERSION` |
if [ -e "$mathjaxdir/VERSION" ] |
|
then |
|
currversion=`cat $mathjaxdir/VERSION` |
|
fi |
fi |
fi |
newversion=`cat VERSION` |
newversion=`cat VERSION` |
comparison=`echo "$newversion > $currversion" | bc` |
comparison=`echo "$newversion > $currversion" | bc` |
if [ $comparison -gt 0 ] |
if [ $comparison -gt 0 ] |
then |
then |
rm -rf $1/ |
if [ -e $mathjaxdir ] |
unzip -q -o -d $1 mathjax-MathJax-v2.0-20-g07669ac.zip |
then |
mv $1/mathjax-MathJax-07669ac/* $1/. |
rm -rf $mathjaxdir |
rm -r $1/mathjax-MathJax-07669ac |
fi |
cp VERSION $1/VERSION |
unzip -q -o -d $mathjaxdir mathjax-MathJax-v2.0-20-g07669ac.zip |
chown -R www:www $1 |
mv $mathjaxdir/mathjax-MathJax-07669ac/* $mathjaxdir/. |
find $1 -type d -exec chmod u=rwx,go-rwx {} \; |
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 |
fi |