2 # vim: ts=4 sw=4 noet :
3 #==================================================================================
4 # Copyright (c) 2019 Nokia
5 # Copyright (c) 2018-2019 AT&T Intellectual Property.
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 #==================================================================================
21 # ---------------------------------------------------------------------------------
22 # Mnemonic: rebuild.ksh
23 # Abstract: This is a simple script that will cause RMR to be rebuilt. It
24 # may be invoked by any of the run_* scripts in this directory.
27 # The build path is echod onto stdout so that the caller is able
28 # to reference build items for compile/linking. All other communication
29 # should be directed to stderr.
32 # Author: E. Scott Daniels
33 # ---------------------------------------------------------------------------------
36 parent=${PWD%/*} # allow us to step up gracefully
38 build_path=${BUILD_PATH:-${gparent}/.build} # where we should build; .build by default
40 echo "$(date) build starts" >&2
45 if [[ $1 != "nopull" ]] # pull by default, but for local dev testing this needs to be avoided
47 git pull # get the up to date code so if run from an old image it's a good test
55 echo "$(date) build failed" >&2
59 echo "$(date) build completed" >&2