]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-dev-setup: get the last part of the branch
authorAlfredo Deza <adeza@redhat.com>
Fri, 2 Sep 2016 13:58:49 +0000 (09:58 -0400)
committerAlfredo Deza <adeza@redhat.com>
Fri, 2 Sep 2016 14:42:14 +0000 (10:42 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
ceph-dev-setup/build/build

index fdcf85d888df3d49250d5b9927f741f02a5e6cab..aacaa7c3bced2fbb2b3f5c7ca3c511490c5b2d71 100644 (file)
@@ -1,6 +1,7 @@
 #!/bin/bash -ex
 
-BRANCH=`echo $GIT_BRANCH | cut -d '/' -f 2-`
+# split on '/' to get just 'wip-mybranch' when input is like: origin/wip-mybranch
+BRANCH=`echo ${GIT_BRANCH} | rev | cut -d '/' -f 1 | rev`
 
 HOST=$(hostname --short)
 echo "Building on ${HOST}"