-
-
Save evanxd/7a09aabd7910a14cce55 to your computer and use it in GitHub Desktop.
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 | |
# setup your mozilla-central REPO and github REMOTE. | |
# path to mozilla-central | |
REPO="mozilla-central" | |
# regualr expression for gaia github repo url | |
REMOTE="https:\/\/github\.com\/RickyChien\/gaia" | |
# try chooser syntax: http://trychooser.pub.build.mozilla.org | |
TRY_CMD="try: -b do -p emulator,emulator-jb,emulator-kk,linux32_gecko,linux64_gecko,macosx64_gecko,win32_gecko -u all -t none" | |
GAIA_JSON="b2g/config/gaia.json" | |
BRANCH=$1 | |
if [ -z "$BRANCH" ]; then | |
echo "Usage: $0 branch-name"; | |
exit 1; | |
fi | |
cd $REPO | |
hg qpop && hg qremove try.patch | |
hg pull && hg update | |
sed -i -e "s/\"remote\": \"\"/\"remote\": \"$REMOTE\"/g" "$GAIA_JSON" | |
sed -i -e "s/\"branch\": \"\"/\"branch\": \"$BRANCH\"/g" "$GAIA_JSON" | |
hg qqueue -c && hg qqueue --active && hg qnew try.patch && hg qref -m "$TRY_CMD" && hg push -f try && hg qpop && hg qremove try.patch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment