Ignore:
Timestamp:
04/12/12 16:36:32 (2 years ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Check bundle image file integrity.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • install-scripts/mac/bundle-daily-build-hg.sh

    r10289 r10788  
    33# ./bundle-daily-build-hg.sh 
    44# 
     5# $1 Force 
     6# 
    57 
     8FORCE=$1 
    69 
    710trap "echo \"Script failed\"" ERR 
     
    1922         
    2023# Create the bundle if it does not yet exist 
    21 if [[ ! -e /Volumes/download/orange-bundle-hg-0.0.$DAILY_REVISION.dmg || $DAILY_REVISION -eq "tip" ]]; then 
     24if [[ ! -e /Volumes/download/orange-bundle-hg-0.0.$DAILY_REVISION.dmg || $DAILY_REVISION -eq "tip" || $FORCE ]]; then 
    2225    echo "Building orange revision $DAILY_REVISION" 
    2326    ./bundle-build-hg.sh /private/tmp tip $BUNDLE 
     
    2528    # Get the revision again in case it was "tip" 
    2629    DAILY_REVISION=`hg log -r tip -R /private/tmp/repos/orange | grep 'changeset:' | cut -d ' ' -f 4 | cut -d ':' -f 1` 
    27  
    2830 
    2931    # TODO: Should be called only on a daily build server and not if building locally 
     
    3638    echo "Moving bundle to the download directory." 
    3739    mv $BUNDLE /Volumes/download/orange-bundle-hg-0.0.$DAILY_REVISION.dmg 
    38      
     40 
    3941    echo "Setting permissions." 
    4042    chmod +r /Volumes/download/orange-bundle-hg-0.0.$DAILY_REVISION.dmg 
     43 
     44    # Check integrity  
     45    MD5=`md5 -q /Volumes/download/orange-bundle-hg-0.0.$DAILY_REVISION.dmg` 
     46    if [[ $MD5 != `md5 -q $BUNDLE` ]]; then 
     47        echo "Error moving the bundle in place" 
     48        rm /Volumes/download/orange-bundle-hg-0.0.$DAILY_REVISION.dmg 
     49        exit 1 
     50    fi 
    4151     
    4252    echo "Registering new bundles." 
Note: See TracChangeset for help on using the changeset viewer.