aboutsummaryrefslogtreecommitdiff
path: root/build-scripts/create-user-build-script
diff options
context:
space:
mode:
authorAmit Pundir <amit.pundir@linaro.org>2013-01-23 21:14:36 +0530
committerAmit Pundir <amit.pundir@linaro.org>2013-01-23 21:14:36 +0530
commita05b484e028143309ba273454947f7e40bbef294 (patch)
tree6bf6170315b3338afb2013a8e2554ce69239a41f /build-scripts/create-user-build-script
parente6a16691177016e2d2182a0234dabea72f9565b9 (diff)
user build script: check for already exported access ID
Diffstat (limited to 'build-scripts/create-user-build-script')
-rwxr-xr-xbuild-scripts/create-user-build-script20
1 files changed, 11 insertions, 9 deletions
diff --git a/build-scripts/create-user-build-script b/build-scripts/create-user-build-script
index b5cd0be..f7d059f 100755
--- a/build-scripts/create-user-build-script
+++ b/build-scripts/create-user-build-script
@@ -32,7 +32,9 @@ set -e
EXACT=1
DIR=android
-ID=default-bot
+if [ -z "\${LINARO_ANDROID_ACCESS_ID}" ] ; then
+ LINARO_ANDROID_ACCESS_ID=default-bot
+fi
usage()
{
@@ -44,7 +46,7 @@ usage()
echo " Default: \${DIR}"
echo " -l <login-id> login-id to clone from linaro-private git repositories"
echo " If in doubt, kindly raise access request to rt@linaro.org"
- echo " Default: \${ID}"
+ echo " Default: \${LINARO_ANDROID_ACCESS_ID}"
exit 1
}
@@ -52,7 +54,7 @@ while getopts "${USAGE_OPTOVERLAY}d:l:ht" optn; do
case \$optn in
$USAGE_OPTHANDLER
d ) DIR=\$OPTARG;;
- l ) ID=\$OPTARG;;
+ l ) LINARO_ANDROID_ACCESS_ID=\$OPTARG;;
t ) EXACT=0;;
h ) usage; exit 1;;
esac
@@ -121,7 +123,7 @@ jenkins_configs_method()
# check for linaro private manifests
PM=\`echo ${MANIFEST_REPO} | grep -i "linaro-private" | wc -l\`
if [ \${PM} -gt 0 ] ; then
- if [ "\${ID}" == "default-bot" ] ; then
+ if [ "\${LINARO_ANDROID_ACCESS_ID}" == "default-bot" ] ; then
echo "You must specify valid login/access-id to clone from linaro-private manifest repositories."
echo "Press "y" to continue (which may result in incomplete build or failure), OR"
echo "Press "n" to enter login details, OR"
@@ -129,13 +131,13 @@ if [ \${PM} -gt 0 ] ; then
read NEXT
if [ \${NEXT} == n ] ; then
echo "Enter login/access-id:"
- read ID
+ read LINARO_ANDROID_ACCESS_ID
elif [ \${NEXT} == h ] ; then
usage
fi
fi
fi
-export MANIFEST_REPO=`echo ${MANIFEST_REPO} | sed 's/\/\/.*-bot@/\/\/'"\${ID}"'@/'`
+export MANIFEST_REPO=`echo ${MANIFEST_REPO} | sed 's/\/\/.*-bot@/\/\/'"\${LINARO_ANDROID_ACCESS_ID}"'@/'`
export MANIFEST_BRANCH=${MANIFEST_BRANCH}
export MANIFEST_FILENAME=${MANIFEST_FILENAME}
export TARGET_PRODUCT=${TARGET_PRODUCT}
@@ -199,7 +201,7 @@ fi
# check for linaro private git repositories
PRI=\`grep -i "linaro-private" .repo/manifests/\${MANIFEST_FILENAME} | wc -l\`
if [ \${PRI} -gt 0 ] ; then
- if [ "\${ID}" == "default-bot" ] ; then
+ if [ "\${LINARO_ANDROID_ACCESS_ID}" == "default-bot" ] ; then
echo "You must specify valid login/access-id to clone from linaro-private git repositories."
echo "Press "y" to continue (which may result in incomplete build), OR"
echo "Press "n" to enter login details, OR"
@@ -207,12 +209,12 @@ if [ \${PRI} -gt 0 ] ; then
read NEXT
if [ \${NEXT} == n ] ; then
echo "Enter login/access-id:"
- read ID
+ read LINARO_ANDROID_ACCESS_ID
elif [ \${NEXT} == h ] ; then
usage
fi
fi
- sed -i 's/\/\/.*-bot@/\/\/'"\${ID}"'@/' .repo/manifests/\${MANIFEST_FILENAME}
+ sed -i 's/\/\/.*-bot@/\/\/'"\${LINARO_ANDROID_ACCESS_ID}"'@/' .repo/manifests/\${MANIFEST_FILENAME}
fi
./repo sync