Created
July 20, 2012 09:27
-
-
Save stasm/3149861 to your computer and use it in GitHub Desktop.
Convenience script for running and updating the B2G desktop builds
This file contains 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 | |
HERE=$(cd `dirname $0`; pwd) | |
if [ $# -eq 0 ]; then | |
if [[ ! -d "$HERE/b2g" || ! -d "$HERE/gaia" ]]; then | |
echo "The b2g and/or gaia directories appear to be missing." | |
echo "Run '$0 update' first." | |
exit 1 | |
fi | |
$HERE/b2g/b2g -profile $HERE/gaia/profile | |
fi | |
if [ "$1" == "update" ]; then | |
if [ -d "$HERE/b2g" ]; then | |
rm -rf $HERE/b2g | |
fi | |
curl http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-central/b2g-18.0a1.en-US.linux-i686.tar.bz2 | tar xvjC $HERE | |
if [ -d "$HERE/gaia" ]; then | |
cd $HERE/gaia | |
git pull | |
DEBUG=1 make profile | |
cd $HERE | |
else | |
git clone https://github.com/mozilla-b2g/gaia | |
DEBUG=1 make -C gaia profile | |
fi | |
fi | |
if [ "$1" == "reset" ]; then | |
cd $HERE/gaia | |
rm -rf profile | |
DEBUG=1 make profile | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment