From c95129cff94dc95940a8437e1283e7159ffa1c96 Mon Sep 17 00:00:00 2001 From: Ari Lazier Date: Wed, 21 Dec 2016 06:30:24 -0800 Subject: [PATCH] fix download core script to properly check the sync dependency (#735) --- scripts/download-core.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/download-core.sh b/scripts/download-core.sh index 930d0f36..a33fc0d1 100755 --- a/scripts/download-core.sh +++ b/scripts/download-core.sh @@ -100,6 +100,10 @@ check_release_notes() { grep -Fqi "$REALM_CORE_VERSION RELEASE NOTES" "$@" } +check_sync_version() { + grep -Fqi "$REALM_SYNC_VERSION" "$@" +} + DOWNLOAD_CORE=1 if ! [ -z "$REALM_CORE_PREFIX" ]; then @@ -167,7 +171,7 @@ if [ "$DOWNLOAD_SYNC" == 1 ]; then # With a prebuilt version we only want to check the first non-empty # line so that checking out an older commit will download the # appropriate version of core if the already-present version is too new - elif ! grep -m 1 . "vendor/$SYNC_DIR/version.txt"; then + elif ! grep -m 1 . "vendor/$SYNC_DIR/version.txt" | check_sync_version; then download_core $SYNC_DIR $REALM_SYNC_VERSION $SYNC_DOWNLOAD_FILE sync "$SYNC_EXTRACT" $EXTRACTED_DIR else echo "The sync library seems to be up to date."