summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbackflip22
1 files changed, 22 insertions, 0 deletions
diff --git a/backflip b/backflip
index 7acbe90..31cb120 100755
--- a/backflip
+++ b/backflip
@@ -37,6 +37,11 @@ print_info() {
echo -e "${blue}** ${NC}${1}"
}
+die() {
+ echo -e "${red}${bold}ERROR: ${NC}${bold}${1}${NC}"
+ exit 1
+}
+
# arg1 : a sentence
# arg2 : a variable
# print arg1 and gather user input in arg2
@@ -63,6 +68,23 @@ forge_entry() {
}
# ==============================================================================
+print_step "Checking Configuration"
+# ==============================================================================
+if ! git remote -v 2>&1 | grep "git@git.linaro.org" > /dev/null ; then
+ die "You're not in the right directory !"
+fi
+if [ ! -e .gitreview ]; then
+ print_info "Gerrit configuration (.gitreview) is missing, creating it."
+ cat <<- EOF > .gitreview
+[gerrit]
+host=review.linaro.org
+port=29418
+project=toolchain/gcc
+EOF
+fi
+print_info "${bold}OK${NC}"
+
+# ==============================================================================
print_step "Finding SHA1"
# ==============================================================================
SHA1=`git log --format=format:"%H" --grep=trunk@${1} master`