Permalink
Browse files

Merge pull request #5 from jonallengriffin/config

Add ability to specify repo and branch for manifest
  • Loading branch information...
michaelwu committed May 23, 2012
2 parents 32a25c6 + b9ed30a commit ba2bdd95254669548ee6d07c405f9e145fe63b9c
Showing with 24 additions and 1 deletion.
  1. +24 −1 config.sh
View
@@ -14,9 +14,17 @@ install_blobs() {
}
repo_sync() {
+ if [ "$GITREPO" = "$GIT_TEMP_REPO" ]; then
+ BRANCH="master"
+ else
+ BRANCH=$1
+ fi
rm -rf .repo/manifest* &&
- $REPO init -u git://github.com/mozilla-b2g/b2g-manifest -b $1 &&
+ $REPO init -u $GITREPO -b $BRANCH &&
$REPO sync
+ if [ "$GITREPO" = "$GIT_TEMP_REPO" ]; then
+ rm -rf $GIT_TEMP_REPO
+ fi
}
case `uname` in
@@ -31,6 +39,21 @@ case `uname` in
exit -1
esac
+GIT_TEMP_REPO="tmp_manifest_repo"
+if [ -n "$2" ]; then
+ GITREPO=$GIT_TEMP_REPO
+ GITBRANCH="master"
+ rm -rf $GITREPO &&
+ git init $GITREPO &&
+ cp $2 $GITREPO/default.xml &&
+ cd $GITREPO &&
+ git add default.xml &&
+ git commit -m "manifest" &&
+ cd ..
+else
+ GITREPO="git://github.com/mozilla-b2g/b2g-manifest"
+fi
+
case "$1" in
"galaxy-s2")
echo DEVICE=galaxys2 > .config &&

0 comments on commit ba2bdd9

Please sign in to comment.