[LON-CAPA-cvs] cvs: loncom /html/adm/ckeditor commands

raeburn raeburn at source.lon-capa.org
Wed May 22 12:23:11 EDT 2024


raeburn		Wed May 22 16:23:11 2024 EDT

  Modified files:              
    /loncom/html/adm/ckeditor	commands 
  Log:
  - Update ckeditor to 4.22.1. Modify script so 4.221 can replace 4.47.
  
  
Index: loncom/html/adm/ckeditor/commands
diff -u loncom/html/adm/ckeditor/commands:1.10 loncom/html/adm/ckeditor/commands:1.11
--- loncom/html/adm/ckeditor/commands:1.10	Wed May 22 15:34:49 2024
+++ loncom/html/adm/ckeditor/commands	Wed May 22 16:23:10 2024
@@ -1,6 +1,6 @@
 path=`pwd`
 htmldir='/home/httpd/html'
-currversion=3.66
+currversion=4.47
 ckeditordir="$htmldir/ckeditor"
 if [ -e $ckeditordir ]
 then
@@ -10,7 +10,17 @@
   fi
 fi
 newversion=`cat VERSION`
-comparison=`echo "$newversion > $currversion" | bc`
+arrnewversion=(${newversion//./ })
+arrcurrversion=(${currversion//./ })
+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`
+  fi
+fi
 if [ $comparison -gt 0 ]
 then
   if [ -e $ckeditordir ]
@@ -18,8 +28,8 @@
     rm -rf $ckeditordir
   fi
   cd $htmldir
-  echo $path/ckeditor_4.4.7.tar.gz
-  tar -zxf $path/ckeditor_4.4.7.tar.gz
+  echo $path/ckeditor_4.22.1.tar.gz
+  tar -zxf $path/ckeditor_4.22.1.tar.gz
   cp -r $path/plugins/lcm ckeditor/plugins/
   cp -r $path/plugins/chem ckeditor/plugins/
   cp $path/VERSION ckeditor/VERSION




More information about the LON-CAPA-cvs mailing list