open-cas-linux/configure
Michal Mielewczyk 3f65c7fab2 configure.d: Print information about progress from configure script
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-07-02 10:24:41 -04:00

26 lines
677 B
Bash
Executable File

#!/bin/bash
#
# Copyright(c) 2012-2019 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause-Clear
#
which dirname 2>&1 > /dev/null || { echo >&2 "Eror: missing 'dirname' utility"; exit 1; }
which realpath 2>&1 > /dev/null || { echo >&2 "Eror: missing 'realpath' utility"; exit 1; }
SCRIPTPATH=`dirname $0`
SCRIPTPATH=`realpath $SCRIPTPATH`
CONFIG_FILES=`ls $SCRIPTPATH/configure.d/*.conf | sort`
rm -f $SCRIPTPATH/modules/generated_defines.h
files_count=`echo $CONFIG_FILES | wc -w`
progress=0
for file in $CONFIG_FILES; do
progress=$((progress+1))
echo -ne "Configuring OpenCAS: $progress/$files_count\033[0K\r"
/bin/bash $file
done
echo -ne " \033[0K\r"