Skip to content

Instantly share code, notes, and snippets.

@swarnava
Forked from stasm/boot2gecko.sh
Last active December 29, 2015 04:39
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 swarnava/7616520 to your computer and use it in GitHub Desktop.
Save swarnava/7616520 to your computer and use it in GitHub Desktop.
Convenience script for running and updating the B2G desktop builds
#!/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-31.0a1.multi.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