"Fossies" - the Fresh Open Source Software Archive

Member "monasca-api-3.1.0/common/build_common.sh" (27 Sep 2019, 715 Bytes) of package /linux/misc/openstack/monasca-api-3.1.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/sh
    2 set -x
    3 ME=`whoami`
    4 echo "Running as user: $ME"
    5 MVN=$1
    6 VERSION=$2
    7 BRANCH=$3
    8 
    9 check_user() {
   10     ME=$1
   11     if [ "${ME}" != "zuul" ]; then
   12        echo "\nERROR: Download monasca-common and do a mvn install to install the monasca-commom jars\n" 1>&2
   13        exit 1
   14     fi
   15 }
   16 
   17 BUILD_COMMON=false
   18 POM_FILE=~/.m2/repository/monasca-common/monasca-common/${VERSION}/monasca-common-${VERSION}.pom
   19 if [ ! -r "${POM_FILE}" ]; then
   20     check_user "${ME}"
   21     BUILD_COMMON=true
   22 fi
   23 
   24 # This should only be done on the stack forge system
   25 if [ "${BUILD_COMMON}" = "true" ]; then
   26    git clone -b ${BRANCH} https://git.openstack.org/openstack/monasca-common --depth 1
   27    cd monasca-common
   28    ${MVN} clean
   29    ${MVN} install
   30 fi