bohu | c383a21 | 2017-02-02 12:25:31 -0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | set -e |
| 3 | |
| 4 | if [ $# == 1 ] |
| 5 | then |
| 6 | build=$1 |
| 7 | else |
| 8 | echo Usage: $0 build |
| 9 | exit 1 |
| 10 | fi |
| 11 | |
| 12 | linux_zip=sdk-repo-linux-emulator-$build.zip |
| 13 | mac_zip=sdk-repo-darwin-emulator-$build.zip |
| 14 | |
| 15 | echo Fetching Linux $build |
| 16 | /google/data/ro/projects/android/fetch_artifact --bid $build --target sdk_tools_linux "$linux_zip" |
| 17 | rm -rf linux-x86_64 |
| 18 | unzip $linux_zip |
| 19 | mv emulator linux-x86_64 |
| 20 | git add linux-x86_64 |
| 21 | |
| 22 | echo Fetching Mac $build |
| 23 | /google/data/ro/projects/android/fetch_artifact --bid $build --target sdk_tools_mac "$mac_zip" |
| 24 | rm -rf darwin-x86_64 |
| 25 | unzip $mac_zip |
| 26 | mv emulator darwin-x86_64 |
| 27 | git add darwin-x86_64 |
| 28 | |
| 29 | |
| 30 | printf "Upgrade emulator to emu-master-dev build $build\n\n" > emulator.commitmsg |
| 31 | |
| 32 | |
| 33 | git commit -t emulator.commitmsg |
| 34 | |
| 35 | rm emulator.commitmsg |
| 36 | rm $linux_zip |
| 37 | rm $mac_zip |