Changeset 30004

Show
Ignore:
Timestamp:
03.07.2015 19:47:45 (4 years ago)
Author:
ak19
Message:

Adding DEC to caveat latest too, although nightly DEC have never been checked for correctness, to see that they behave the way they did when Oran was here.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • other-projects/nightly-tasks/crons-and-scripts/do-snapshots-and-latest.sh

    r30002 r30004  
    197197    # file upload into puka's caveat-emptor location     
    198198    # E.g. for testing, latest=Greenstone-3.07-candidate-2015.06.30-linux-x64 
     199 
    199200    echo "Latest file in caveat is: $latest" 
    200201 
     
    202203    # in this case the GS2 or GS3 full version number 
    203204    # http://stackoverflow.com/questions/428109/extract-substring-in-bash 
     205 
    204206    local matchfile=`echo $latest| cut -d'-' -f 2` 
    205207    echo "Found gs version prefix: $matchfile" 
     
    233235        fi 
    234236    done 
    235      
     237 
     238    elif [[ "$latest" == *"documented-examples-"* ]]; then 
     239    echo "DEC" 
     240 
     241    # both documented examples zip and tar.gz files would have been generated and uploaded together 
     242     
     243    local file=Greenstone-documented-examples-${today} 
     244    local re_file=Greenstone-documented-examples-* 
     245    local dec_exts=(".tar.gz" ".zip") 
     246 
     247    for ext in ${dec_exts[@]}; do 
     248        if [[ -f ${caveat_dir}${file}.tar.gz ]]; then 
     249 
     250        echo "Removing ${latest_dir}${re_file}${ext}" 
     251        echo "and replacing with ${latest_dir}${file}${ext}" 
     252 
     253        rm ${latest_dir}${re_file}${ext} 
     254        ln ${caveat_dir}${file}${ext} ${latest_dir}${file}${ext} 
     255        fi 
     256    done 
     257     
    236258    else 
    237259    # not src component or dist, but binary file, which are uploaded one at a time.