#!/bin/sh ########################################################################### # # Copyright (c) 2021-2024 Diality Inc. - All Rights Reserved. # # THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN # WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. # # @file alarmMapping.sh # # @author (last) Behrouz NematiPour # @date (last) 04-Oct-2022 # @author (original) Behrouz NematiPour # @date (original) 11-May-2021 # ############################################################################ ALARM_MAPPING=../scripts/build/alarmMapping BRANCH=$(git symbolic-ref --short HEAD) if ( test -n "$1" ); then BRANCH="$1" fi echo "update the common repo" cd common if ( test -d .git ); then git checkout $BRANCH git pull fi cd .. if ! ( test -x $ALARM_MAPPING ); then echo "Alarm Mapping tool doesn't exist. Continues by assuming the Alarm Table is updated." # if return anything other than 0 build stops running next steps. # it is ok for the dev_test to not to have the script folder and # common folder not as a repository. exit 0 fi # update the alarm messaging echo "update the alarm message mapping" $ALARM_MAPPING \ common/ \ sources/model/hd/alarm/ \ 2> alarmMapping.err \ | tee alarmMapping.log echo "move the Alarm code mapping to current location(./)" mv ../scripts/build/AlarmMapping.csv .