fsfw-example-stm32h7-rtems/cmake/scripts/stm32h7-make-debug.sh

35 lines
772 B
Bash
Raw Normal View History

2021-10-11 13:34:57 +02:00
#!/bin/sh
counter=0
cfg_script_name="cmake-build-cfg.py"
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f ${cfg_script_name} ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "${cfg_script_name} not found in upper directories!"
exit 1
fi
2021-10-11 13:37:01 +02:00
build_generator="make"
2021-10-11 13:34:57 +02:00
os_fsfw="rtems"
2022-05-27 01:46:51 +02:00
builddir="cmake-build-debug"
2021-10-11 13:34:57 +02:00
build_type="debug"
if [ "${OS}" = "Windows_NT" ]; then
python="py"
# Could be other OS but this works for now.
else
python="python3"
fi
echo "Running command (without the leading +):"
2021-10-11 13:37:01 +02:00
set -x # Print command
2021-10-11 13:34:57 +02:00
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -l "${builddir}" \
-b "${build_type}"
# Use this if commands are added which should not be printed
# set +x