Created
June 14, 2013 16:26
-
-
Save bobsilverberg/5783306 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
echo "Plug in your device" | |
adb wait-for-device | |
echo "Found device" | |
#dir=$(mktemp -d -t revision) | |
dir=$(mktemp -d -t revision.XXXXXX) | |
cd $dir | |
adb pull /system/b2g/omni.ja &>/dev/null || echo "Error pulling gecko" | |
adb pull /system/b2g/webapps/settings.gaiamobile.org/application.zip &> /dev/null || echo "Error pulling gaia file" | |
adb pull /system/b2g/application.ini &> /dev/null || echo "Error pulling application.ini" | |
unzip omni.ja chrome/toolkit/content/global/buildconfig.html > /dev/null || true | |
unzip application.zip resources/gaia_commit.txt > /dev/null | |
echo 'Gecko ' $(grep "Built from" ./chrome/toolkit/content/global/buildconfig.html | sed "s,.*<a href=\",,g ; s,\">.*,,g") | |
echo 'Gaia ' $(head -n 1 ./resources/gaia_commit.txt) | |
for i in BuildID Version ; do | |
echo $i $(grep "^ *$i" application.ini | sed "s,.*=,,g") | |
done | |
rm -rf $dir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment