summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common7
-rwxr-xr-xlco18
-rw-r--r--settings6
3 files changed, 26 insertions, 5 deletions
diff --git a/common b/common
index 12818e0..20a5afc 100644
--- a/common
+++ b/common
@@ -1,6 +1,11 @@
SCRIPTS=$(realpath $(dirname $0))
DIR=$(realpath $SCRIPTS/..)
-SRC=$DIR/src
+[ -z "$PRIVATE" ] && PRIVATE=false
+if $PRIVATE; then
+ SRC=$DIR/src-private
+else
+ SRC=$DIR/src
+fi
. $SCRIPTS/settings
[[ ":$PATH:" == *":$SCRIPTS:"* ]] || export PATH=$PATH:$SCRIPTS
[ -d "$SRC" ] || mkdir -p "$SRC"
diff --git a/lco b/lco
index 54d8472..7b1e0fa 100755
--- a/lco
+++ b/lco
@@ -1,4 +1,11 @@
#!/bin/sh -e
+if [ "$1" = "--private" -o "$1" = "-p" ]; then
+ PRIVATE=true
+ shift
+else
+ PRIVATE=false
+fi
+
. "`dirname $0`"/common
TREE="`echo $1 |sed -e 's,\.git$,,'`"
@@ -6,6 +13,13 @@ TREE="`echo $1 |sed -e 's,\.git$,,'`"
B=`basename $TREE`
D=`dirname $TREE`
+if $PRIVATE; then
+ SERVER=ssh://$PRIVUSER@dev-private-review.linaro.org:29418/$TREE.git
+ shift
+else
+ SERVER=ssh://$USER@android.git.linaro.org:29418/$TREE.git
+fi
+
OK=false
if [ -d $SRC/$TREE ]; then
cd $SRC/$TREE
@@ -32,9 +46,10 @@ fi
mkdir -p $SRC/$D
cd $SRC/$D
-git clone ssh://$USER@android.git.linaro.org:29418/$TREE.git
+git clone $SERVER
cd $B
[ -n "$EMAIL" ] && git config user.email $EMAIL
+gitdir=$(git rev-parse --git-dir); scp -p -P 29418 $USER@android-review.linaro.org:hooks/commit-msg ${gitdir}/hooks/
git remote add aosp https://android-review.googlesource.com/$TREE.git
# No way to do this without hardcodes...
case $TREE in
@@ -79,4 +94,3 @@ fi
if ! $OK; then
git checkout android-${ANDROIDVERSION}_r${ANDROIDREVISION}
fi
-scp -P 29418 $USER@android.git.linaro.org:hooks/commit-msg .git/hooks/
diff --git a/settings b/settings
index e256c97..ab38a5e 100644
--- a/settings
+++ b/settings
@@ -1,11 +1,13 @@
# username on android.git.linaro.org
USER=bero
+# user on dev-private-review.linaro.org
+PRIVUSER=bernhard.rosenkranzer
# Email address to be used in git commits (if different from what is set by
# git config --global)
EMAIL=Bernhard.Rosenkranzer@linaro.org
# Default Android versions
-ANDROIDVERSION=4.4.2
-ANDROIDREVISION=1
+ANDROIDVERSION=5.1.1
+ANDROIDREVISION=14
# Versions to try (in that order) for every repository
# android-${ANDROIDVERSION}_r${ANDROIDREVISION} is added as a last resort
# fallback unconditionally (treated slightly differently because it's a