#!/bin/sh ########################################################################### # # Copyright (c) 2021-2023 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 generate_config_files_sha.sh # # @author (last) Vy # @date (last) 25-Jul-2023 # @author (original) Vy # @date (original) 25-Jul-2023 # ############################################################################ # $1 - the path to the settings folder # $2 - sha file path # NOTE: The expectation is the configuration files are in a parent folder settings # eg. $HOME/project/application/resources/settings/ if [ $# -lt 2 ]; then currentFile=$(basename "$0") echo "Usage: ./$currentFile " exit 1003 fi # traverse to the settings folder where the conf files live cd $1 # check the sha against stored sha256sum -c $2 if [ $? -eq 0 ]; then echo "" exit 0 else echo "SHA check failed" exit 1003 fi