From 0d38257dbb9c9318f77d0d2ae915988de5617f49 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Sun, 14 Jun 2020 12:35:06 -0700 Subject: [PATCH] Fix perf-libs version detection (#10571) automerge --- fetch-perf-libs.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fetch-perf-libs.sh b/fetch-perf-libs.sh index 4d28761b9..b7d0424b0 100755 --- a/fetch-perf-libs.sh +++ b/fetch-perf-libs.sh @@ -6,7 +6,7 @@ VERSION=$PERF_LIBS_VERSION-1 set -e cd "$(dirname "$0")" -if [[ ! -f target/perf-libs/.$VERSION ]]; then +if [[ $VERSION != "$(cat target/perf-libs/.version 2> /dev/null)" ]]; then if [[ $(uname) != Linux ]]; then echo Note: Performance libraries are only available for Linux exit 0 @@ -17,6 +17,7 @@ if [[ ! -f target/perf-libs/.$VERSION ]]; then exit 0 fi + rm -rf target/perf-libs mkdir -p target/perf-libs ( set -x @@ -35,7 +36,7 @@ if [[ ! -f target/perf-libs/.$VERSION ]]; then mkdir -p ~/.cache mv solana-perf.tgz ~/.cache/solana-perf-$PERF_LIBS_VERSION.tgz fi - touch .$VERSION + echo "$VERSION" > .version ) # Setup symlinks so the perf-libs/ can be found from all binaries run out of