Added a function to get the branch we are building.

(cherry picked from commit 1e4881bf43)
This commit is contained in:
Ramon Novoa 2016-05-10 16:53:01 +02:00
parent a2fb483e3f
commit 0e76af6042
1 changed files with 8 additions and 0 deletions

View File

@ -8,3 +8,11 @@ BUILD=$(grep 'my $pandora_build =' $CODEHOME/pandora_server/lib/PandoraFMS/Confi
X86_64=`uname -m | grep x86_64`
CONSOLEHOME=$CODEHOME/pandora_console
CONSOLEHOME_ENT=$CODEHOME_ENT/pandora_console
function get_current_branch {
cd "$CODEHOME" || return ""
BRANCH=`git branch 2>/dev/null | grep \* | awk '{print $2}'`
cd -
return $BRANCH
}