#!/bin/bash
cd app
FILE="AppUpdateManager.jar"

if [ -f "../$FILE" ];
then
  file1_md5=$(md5sum "${FILE}")
  file2_md5=$(md5sum "../${FILE}")

  if [ ! "${file1_md5}" == "${file2_md5}" ]; then
    \cp $FILE ../
  fi

else
   cp $FILE ../
fi
cd ..
jre/bin/java -jar AppUpdateManager.jar

