--- loncom/html/adm/ckeditor/commands 2015/03/31 13:45:39 1.7
+++ loncom/html/adm/ckeditor/commands 2024/05/22 16:23:10 1.11
@@ -10,7 +10,17 @@ then
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,9 +28,10 @@ then
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
cp $path/loncapaconfig.js ckeditor/loncapaconfig.js
chown -R www:www ckeditor