Diff for /loncom/html/adm/geogebra/commands between versions 1.2 and 1.6

version 1.2, 2013/01/10 05:36:00 version 1.6, 2024/05/31 02:07:02
Line 1 Line 1
 currversion=0.0  currversion='0.0.0'
 webdir='/home/httpd/html/adm/geogebra/web'  webdir='/home/httpd/html/adm/geogebra/web'
   cssdir='/home/httpd/html/adm/geogebra/css'
 if [ -e $webdir ]  if [ -e $webdir ]
 then  then
     if [ -e "$webdir/VERSION" ]      if [ -e "$webdir/VERSION" ]
Line 8  then Line 9  then
     fi      fi
 fi  fi
 newversion=`cat VERSION`  newversion=`cat VERSION`
 comparison=`echo "$newversion > $currversion" | bc`  arrnewversion=(${newversion//./ })
   arrnewlength=${#arrnewversion[@]}
   arrnewcomp=`echo "$arrnewlength < 3" | bc`
   if [ $arrnewcomp -gt 0 ]
   then
       arrnewversion[2]=0;
   fi
   arrcurrversion=(${currversion//./ })
   arrcurrlength=${#arrcurrversion[@]}
   arrcurrcomp=`echo "$arrcurrlength < 3" | bc`
   if [ $arrcurrcomp -gt 0 ]
   then
       arrcurrversion[2]=0;
   fi
   comparison=`echo "${arrnewversion[0]} > ${arrcurrversion[0]}" | bc`
   if [ $comparison -eq 0 ]
   then
     comparison=`echo "${arrnewversion[0]} < ${arrcurrversion[0]}" | bc`
     if [ $comparison -eq 0 ]
     then
       comparison=`echo "${arrnewversion[1]} > ${arrcurrversion[1]}" | bc`
       if [ $comparison -eq 0 ]
       then
         comparison=`echo "${arrnewversion[1]} < ${arrcurrversion[1]}" | bc`
         if [ $comparison -eq 0 ]
         then
           comparison=`echo "${arrnewversion[2]} > ${arrcurrversion[2]}" | bc`
         fi
       fi
     fi
   fi
 if [ $comparison -gt 0 ]  if [ $comparison -gt 0 ]
 then  then
   if [ -e $webdir ]     if [ -e $webdir ]
   then    then
       rm -rf $webdir        rm -rf $webdir
         if [ -e "$webdir/geogebra_html5.tar.gz" ]
         then
             rm "$webdir/geogebra_html5.tar.gz"
         fi
   fi    fi
   tar -xzf geogebra_html5.tar.gz    if [ -e $cssdir ]
     then
         rm -rf $cssdir
     fi
     tar -xzf geogebraweb_5.2.843.tar.gz
   mv web $webdir    mv web $webdir
     mv css $cssdir
   cp VERSION $webdir/VERSION    cp VERSION $webdir/VERSION
   chown -R www:www $webdir    chown -R www:www $webdir
   find $webdir -type d -exec chmod u=rwx,go-rwx {} \;    find $webdir -type d -exec chmod u=rwx,go-rwx {} \;
     chown -R www:www $cssdir
     find $cssdir -type d -exec chmod u=rwx,go-rwx {} \;
     if [ -e "$webdir/geogebraweb_5.2.843.tar.gz" ]
     then
         rm "$webdir/geogebraweb_5.2.843.tar.gz"
     fi
   sleep 1    sleep 1
 fi  fi

Removed from v.1.2  
changed lines
  Added in v.1.6


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