Apache Solr open-source search software
SOLR-669 snappuler fix for FreeBSD/Darwin
Otis Gospodneticfacb2db8f3bf
diff --git a/CHANGES.txt b/CHANGES.txtindex 23516d68ea9..16cccfbc3eb 100644--- a/CHANGES.txt+++ b/CHANGES.txt@@ -526,6 +526,8 @@ Bug Fixes46. SOLR-696: Fixed bug in NamedListCodec in regards to serializing Iterable objects. (gsingers)+47. SOLR-669: snappuler fix for FreeBSD/Darwin (Richard "Trey" Hyde via Otis Gospodnetic)+Other Changes1. SOLR-135: Moved common classes to org.apache.solr.common and altered thebuild scripts to make two jars: apache-solr-1.3.jar anddiff --git a/src/scripts/snappuller b/src/scripts/snappullerindex fd081ca31f4..14b75679142 100755--- a/src/scripts/snappuller+++ b/src/scripts/snappuller@@ -224,8 +224,14 @@ ssh -o StrictHostKeyChecking=no ${master_host} mkdir -p ${master_status_dir}# start new distribution statsrsyncStart=`date +'%Y-%m-%d %H:%M:%S'`+if [[ "${OS}" == "Darwin" || "${OS}" == "FreeBSD" ]]+then+ startTimestamp=`date -j -f '%Y-%m-%d %H:%M:%S' "$rsyncStart" +'%Y%m%d-%H%M%S'`+ rsyncStartSec=`date -j -f '%Y-%m-%d %H:%M:%S' "$rsyncStart" +'%s'`+elsestartTimestamp=`date -d "$rsyncStart" +'%Y%m%d-%H%M%S'`rsyncStartSec=`date -d "$rsyncStart" +'%s'`+fistartStatus="rsync of `basename ${name}` started:$startTimestamp"echo ${startStatus} > ${solr_root}/logs/snappuller.statuspushStatus@@ -236,8 +242,14 @@ ${stats} rsync://${master_host}:${rsyncd_port}/solr/${name}/ ${data_dir}/${name}rc=$?rsyncEnd=`date +'%Y-%m-%d %H:%M:%S'`+if [[ "${OS}" == "Darwin" || "${OS}" == "FreeBSD" ]]+then+ endTimestamp=`date -j -f '%Y-%m-%d %H:%M:%S' "$rsyncEnd" +'%Y%m%d-%H%M%S'`+ rsyncEndSec=`date -j -f '%Y-%m-%d %H:%M:%S' "$rsyncEnd" +'%s'`+elseendTimestamp=`date -d "$rsyncEnd" +'%Y%m%d-%H%M%S'`rsyncEndSec=`date -d "$rsyncEnd" +'%s'`+fielapsed=`expr $rsyncEndSec - $rsyncStartSec`if [[ $rc != 0 ]]then