From 177f9003435859addf80c98f5f7904aa84361b5d Mon Sep 17 00:00:00 2001 From: William Au Date: Thu, 20 Nov 2008 14:14:07 +0000 Subject: [PATCH] SOLR-830: Use perl regex to improve accuracy of finding latest snapshot in snappuller git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@719233 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 6 ++++-- src/scripts/snappuller | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 979920b9a9a..7dfcd6395d6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -125,8 +125,6 @@ Bug Fixes 11. SOLR-872: Better error message for incorrect copyField destination (Noble Paul via shalin) -12. SOLR-346: Use perl regex to improve accuracy of finding latest snapshot in snapinstaller (billa) - Other Changes ---------------------- @@ -169,6 +167,10 @@ Bug Fixes 1. SOLR-802: Fix a potential null pointer error in the distributed FacetComponent (David Bowen via ryan) + 2. SOLR-346: Use perl regex to improve accuracy of finding latest snapshot in snapinstaller (billa) + + 3. SOLR-830: Use perl regex to improve accuracy of finding latest snapshot in snappuller (billa) + ================== Release 1.3.0 20080915 ================== diff --git a/src/scripts/snappuller b/src/scripts/snappuller index 14b75679142..4bc94fc96df 100755 --- a/src/scripts/snappuller +++ b/src/scripts/snappuller @@ -178,7 +178,7 @@ fi # get directory name of latest snapshot if not specified on command line if [[ -z ${snap_name} ]] then - snap_name=`ssh -o StrictHostKeyChecking=no ${master_host} "ls ${master_data_dir}|grep 'snapshot\.'|grep -v wip|sort -r|head -1"` + snap_name=`ssh -o StrictHostKeyChecking=no ${master_host} "perl -e 'chdir q|${master_data_dir}|; print ((sort grep {/^snapshot[.][1-9][0-9]{13}$/} <*>)[-1])'"` fi if [[ "${snap_name}" == "" ]] then