From 9abf85c3f7af1495e973cc525447f2046a82995a Mon Sep 17 00:00:00 2001 From: Michael Stanclift Date: Mon, 29 Jun 2020 14:03:47 -0500 Subject: [PATCH] HISTORY_MD5 --- ADVANCED.md | 4 ++-- VERSION | 2 +- gravity-sync.sh | 11 ++++++----- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ADVANCED.md b/ADVANCED.md index 62dd9cd..e3f3ea8 100644 --- a/ADVANCED.md +++ b/ADVANCED.md @@ -14,8 +14,8 @@ Download the latest release from [GitHub](https://github.com/vmstan/gravity-sync ```bash cd ~ -wget https://github.com/vmstan/gravity-sync/archive/v1.8.3.zip -unzip v1.8.3.zip -d gravity-sync +wget https://github.com/vmstan/gravity-sync/archive/v2.0.0.zip +unzip v2.0.0.zip -d gravity-sync cd gravity-sync ``` diff --git a/VERSION b/VERSION index fe4e75f..359a5b9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.8.3 \ No newline at end of file +2.0.0 \ No newline at end of file diff --git a/gravity-sync.sh b/gravity-sync.sh index 494f479..bece31b 100755 --- a/gravity-sync.sh +++ b/gravity-sync.sh @@ -3,7 +3,7 @@ SCRIPT_START=$SECONDS # GRAVITY SYNC BY VMSTAN ##################### PROGRAM='Gravity Sync' -VERSION='1.8.3' +VERSION='2.0.0' # Execute from the home folder of the user who owns it (ex: 'cd ~/gravity-sync') # For documentation or downloading updates visit https://github.com/vmstan/gravity-sync @@ -24,6 +24,7 @@ BACKUP_FOLD='backup' # must exist as subdirectory in LOCAL_FOLDR LOG_PATH="$HOME/${LOCAL_FOLDR}" # replace in gravity-sync.conf to overwrite SYNCING_LOG='gravity-sync.log' # replace in gravity-sync.conf to overwrite CRONJOB_LOG='gravity-sync.cron' # replace in gravity-sync.conf to overwrite +HISTORY_MD5='gravity-sync.md5' # replace in gravity-sync.conf to overwrite # Interaction Customization VERIFY_PASS='0' # replace in gravity-sync.conf to overwrite @@ -396,10 +397,10 @@ function push_gs { function smart_gs { md5_compare - last_primaryDBMD5=$(sed "1q;d" gravity-sync.md5) - last_secondDBMD5=$(sed "2q;d" gravity-sync.md5) - last_primaryCLMD5=$(sed "3q;d" gravity-sync.md5) - last_secondCLMD5=$(sed "4q;d" gravity-sync.md5) + last_primaryDBMD5=$(sed "1q;d" ${HISTORY_MD5}) + last_secondDBMD5=$(sed "2q;d" ${HISTORY_MD5}) + last_primaryCLMD5=$(sed "3q;d" ${HISTORY_MD5}) + last_secondCLMD5=$(sed "4q;d" ${HISTORY_MD5}) echo -e ${primaryDBMD5} " 1" echo -e ${secondDBMD5} " 2"