--- loncom/html/adm/geogebra/commands 2012/08/17 22:52:24 1.1
+++ loncom/html/adm/geogebra/commands 2013/01/10 05:36:00 1.2
@@ -1,16 +1,24 @@
currversion=0.0
-if [ -e "$1/VERSION" ]
+webdir='/home/httpd/html/adm/geogebra/web'
+if [ -e $webdir ]
then
- currversion=`cat $1/VERSION`
+ if [ -e "$webdir/VERSION" ]
+ then
+ currversion=`cat $webdir/VERSION`
+ fi
fi
newversion=`cat VERSION`
comparison=`echo "$newversion > $currversion" | bc`
if [ $comparison -gt 0 ]
then
- rm -rf $1/
- tar -xvf geogebra_html5.tar.gz
- mv web $1
- cp VERSION $1/VERSION
- chown -R www:www $1
- find $1 -type d -exec chmod u=rwx,go-rwx {} \;
+ if [ -e $webdir ]
+ then
+ rm -rf $webdir
+ fi
+ tar -xzf geogebra_html5.tar.gz
+ mv web $webdir
+ cp VERSION $webdir/VERSION
+ chown -R www:www $webdir
+ find $webdir -type d -exec chmod u=rwx,go-rwx {} \;
+ sleep 1
fi