PageRenderTime 125ms CodeModel.GetById 40ms app.highlight 13ms RepoModel.GetById 68ms app.codeStats 0ms

/autoMokoRelease.sh

http://android-on-freerunner.googlecode.com/
Shell | 35 lines | 30 code | 2 blank | 3 comment | 3 complexity | 0b8a458a012a958aa92dbb14ea896c14 MD5 | raw file
 1#!/bin/bash
 2BUILD_ROOT=""                                                                   #Path from / to the directory where you have checked out the repo.
 3PROJECT="android-on-freerunner"                                                 #Google code project
 4USER=""                                                                         #Google code user name without @gmail.com
 5PASSWORD=""                                                                     #Google code password not you gmail password can be found here:
 6                                                                                #http://code.google.com/hosting/settings
 7ANDROID_VERSION="Cupcake"                                                       #version for lables
 8LABELS="Type-Archive, BuildVersion-Weekly"                                      #Labels
 9SUMMARY="Weekly realease of andoid-on-freerunner."                              #Summary "Buildt on: YYYY-MM-DD" will be added to this.
10FILENAME="android-on-freerunner-cupcake-week"                                   #Filename "-YYYY-WW" will be added to the end, after this
11                                                                                #.zip or .tar.gz will be added
12
13LABELS=$LABELS", AndroidVersion-$ANDROID_VERSION"
14SUMMARY=$SUMMARY" Buildt on: "$(date +%Y-%m-%d)
15FILENAME=$FILENAME"-"$(date +%Y-%V)
16cd $BUILD_ROOT
17repo sync
18make TARGET_PRODUCT=freerunner
19rm -rf weeklyBuild
20mkdir weeklyBuild
21cp -R baseDir/* weeklyBuild/
22cp out/target/product/freerunner/*.img weeklyBuild/
23md5sum weeklyBuild/boot/uImage-GTA02.bin weeklyBuild/ramdisk.img weeklyBuild/uImage weeklyBuild/userdata.img weeklyBuild/kernel.img weeklyBuild/qi.img  weeklyBuild/system.img weeklyBuild/uImage.bin > weeklyBuild/md5sums
24cd weeklyBuild
25TRIES=0
26while [[ $? != 0 && $TRIES < 5 ]]      #Retry the buggy zip command 5 times hope that it works one of the times....
27do 
28  let TRIES=TRIES+1 
29  zip -r ../$FILENAME .                #Bugged out zip command!!!!!!!!
30done
31cd ..
32tar -czvf $FILENAME.tar.gz weeklyBuild/*
33
34./googlecode_upload.py -s "$SUMMARY" -p $PROJECT -u $USER -w $PASSWORD -l "$LABELS, OpSys-Windows" $FILENAME.zip
35./googlecode_upload.py -s "$SUMMARY" -p $PROJECT -u $USER -w $PASSWORD -l "$LABELS, OpSys-Linux" $FILENAME.tar.gz