Skip to content

Instantly share code, notes, and snippets.

@vaidik
Forked from bobsilverberg/gist:5783306
Created August 23, 2013 16:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vaidik/6321504 to your computer and use it in GitHub Desktop.
Save vaidik/6321504 to your computer and use it in GitHub Desktop.
#!/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