Changeset 3359

Show
Ignore:
Timestamp:
09/16/11 10:56:21
Author:
douglm
Message:

added an option to fetch the timezone information and build the zipped data file.

Now preferred approach is

./bw -zoneinfo -fetch

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • releases/bedework-3.8/build/quickstart/linux/bw

    r3353 r3359  
    162162usageZoneinfo() { 
    163163  echo "" 
     164  echo "$PRG -zoneinfo -fetch" 
     165  echo "to have data fetched and processed. Alternatively to process a specifi set of data" 
    164166  echo "$PRG -zoneinfo -version VERSION -tzdata path-to-data"  
    165167  echo "for example:"  
    166168  echo "$PRG -zoneinfo -version 2010m -tzdata /data/olson/tzdata2010m.tar.gz"  
     169  echo "" 
     170  echo "The data can be obtained manually in the following manner:" 
     171  echo "  wget 'ftp://elsie.nci.nih.gov/pub/tz*.tar.gz'" 
     172  echo "" 
     173  echo "The version is the '*' part of the name" 
     174   
    167175  exit 1 
    168176} 
     
    304312  bwresources="$bwtzsvr/resources" 
    305313 
    306   shift 
    307    
    308   if [ "$1" != "-version" ] ; then 
    309     echo "got $1" 
    310     echo "Must supply -version parameter for -zoneinfo" 
    311     usageZoneinfo 
    312   fi 
    313    
    314   shift 
    315     echo "got $1" 
    316 #  version="-Dorg.bedework.timezones.version=$1" 
    317   version=$1 
    318   shift 
    319    
    320   if [ "$1" != "-tzdata" ] ; then 
    321     echo "Must supply -tzdata parameter for -zoneinfo" 
    322     usageZoneinfo 
    323   fi 
    324    
    325   shift 
    326 #  tzdata="-Dorg.bedework.timezones.data=$1" 
    327   tzdata=$1 
    328   shift 
    329    
    330314  rm -rf /tmp/bedework 
    331315  mkdir /tmp/bedework 
    332316  mkdir /tmp/bedework/timezones 
     317  mkdir /tmp/bedework/timezones/data 
    333318   
    334319  cd /tmp/bedework/timezones 
     320   
     321  shift 
     322   
     323  if [ "$1" = "-fetch" ] ; then 
     324    shift 
     325    cd data 
     326    wget 'ftp://elsie.nci.nih.gov/pub/tz*.tar.gz' 
     327    gzip -dc tzdata*.tar.gz | tar -xf - 
     328     
     329    filename=$(basename `ls tzdata*`) 
     330    version=$( echo $filename | cut -c 7-11 ) 
     331     
     332    tzdata="/tmp/bedework/timezones/data/$filename" 
     333     
     334    cd .. 
     335     
     336    echo version=$version 
     337    echo tzdata=$tzdata 
     338  else 
     339    if [ "$1" != "-version" ] ; then 
     340      echo "got $1" 
     341      echo "Must supply -version parameter for -zoneinfo" 
     342      usageZoneinfo 
     343    fi 
     344     
     345    shift 
     346 
     347    echo "got $1" 
     348    version=$1 
     349 
     350    shift 
     351     
     352    if [ "$1" != "-tzdata" ] ; then 
     353      echo "Must supply -tzdata parameter for -zoneinfo" 
     354      usageZoneinfo 
     355    fi 
     356     
     357    shift 
     358 
     359    tzdata=$1 
     360 
     361    shift 
     362  fi 
    335363   
    336364  wget http://bedework.org/downloads/lib/vzic-1.3.tgz 
     
    381409  echo "" 
    382410  echo "------------------------------------------------------------------------------" 
    383   echo "tzdata.zip has been built and is at $bwtzsvr/tzdata.zip" 
     411  echo "tzdata.zip has been built and is at $bwtzsvr/dist/tzdata.zip" 
    384412  echo "------------------------------------------------------------------------------" 
    385413  echo "" 
     
    505533      ;; 
    506534# ------------------------Special targets 
    507        deploylog4j) 
     535    deploylog4j) 
    508536          deploylog4j="yes" 
    509537      pkgdefault=