summaryrefslogtreecommitdiffstats
path: root/client/engine/Protocol.lib
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2012-04-27 09:58:24 +0000
committerramon <ramongomez@us.es>2012-04-27 09:58:24 +0000
commit12e8e382a3d6182434be849980b10ba7e04d098b (patch)
tree312cc4f815ea848271e52b47e0304a274d60c841 /client/engine/Protocol.lib
parent62777700aaed829606baac38dc1e722beca89bb5 (diff)
VersiĆ³n 1.0.4, #489: Integrar ticket:489 en rama de desarrollo.
git-svn-id: https://opengnsys.es/svn/branches/version1.0@2993 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client/engine/Protocol.lib')
-rwxr-xr-xclient/engine/Protocol.lib15
1 files changed, 3 insertions, 12 deletions
diff --git a/client/engine/Protocol.lib b/client/engine/Protocol.lib
index e81def55..597505c6 100755
--- a/client/engine/Protocol.lib
+++ b/client/engine/Protocol.lib
@@ -998,21 +998,12 @@ fi
#echo "paso 4. recuperamos o calculamos los md5 de los ficheros"
if [ -f $FILESOURCE.sum ]
then
- # echo "leyendo el sum del fichero sum del repo"
MD5SOURCE=$(cat $FILESOURCE.sum)
else
- # echo "calculando el sun del repo"
- MD5SOURCE=$(md5sum $FILESOURCE | cut -f1 -d" ")
-fi
-if [ -f $FILETARGET.sum ]
-then
- #echo "leyendo el sum de la cache"
- MD5TARGET=$(cat $FILETARGET.sum)
-else
- #echo "calculando el sum de la cache"
- md5sum $FILETARGET | cut -f1 -d" " > $FILETARGET.sum
- MD5TARGET=$(cat $FILETARGET.sum)
+ MD5SOURCE=$(ogCalculateChecksum $FILESOURCE)
fi
+[ ! -f $FILETARGET.sum ] && ogCalculateChecksum $FILETARGET > $FILETARGET.sum
+MD5TARGET=$(cat $FILETARGET.sum)
#echo "Paso 5. comparamos los md5"
#TODO: que hacer cuando los md5 son distintos. Por defecto borrar.