summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2011-09-23 12:14:20 +0100
committerMark McLoughlin <markmc@redhat.com>2011-09-23 12:21:29 +0100
commit48bc6645da2f12a6c1667d2db49afe1d5417de9f (patch)
tree3a02dcde70748b2ec3241d6d60df3006ebd9fca2 /tools
parent37100f5653960b7f898e91663839feed51e14419 (diff)
Fix rfc.sh's check for the project
From 'git remote show origin' we get 'openstack/nova.git' but gerrit's ls-projects returns 'openstack/nova' Change-Id: I4ea6361633d0e94895dbbdaf3837f12c6c307bfc
Diffstat (limited to 'tools')
-rwxr-xr-xtools/rfc.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/rfc.sh b/tools/rfc.sh
index 0bc153195..901fade1c 100755
--- a/tools/rfc.sh
+++ b/tools/rfc.sh
@@ -48,13 +48,13 @@ add_remote()
if project_list=`ssh -p29418 -o StrictHostKeyChecking=no $username@review.openstack.org gerrit ls-projects 2>/dev/null`
then
echo "$username@review.openstack.org:29418 worked."
- if echo $project_list | grep $project >/dev/null
+ if echo $project_list | grep -w "${project%.git}" >/dev/null
then
echo "Creating a git remote called gerrit that maps to:"
echo " ssh://$username@review.openstack.org:29418/$project"
git remote add gerrit ssh://$username@review.openstack.org:29418/$project
else
- echo "The current project name, $project, is not a known project."
+ echo "The current project name, ${project%.git}, is not a known project."
echo "Please either reclone from github/gerrit or create a"
echo "remote named gerrit that points to the intended project."
return 1