diff --git a/cmake/scripts/Hosted/make_debug_cfg.sh b/cmake/scripts/Hosted/make-debug-cfg.sh similarity index 60% rename from cmake/scripts/Hosted/make_debug_cfg.sh rename to cmake/scripts/Hosted/make-debug-cfg.sh index d3b3bf4..883a05d 100755 --- a/cmake/scripts/Hosted/make_debug_cfg.sh +++ b/cmake/scripts/Hosted/make-debug-cfg.sh @@ -1,17 +1,18 @@ #!/bin/sh counter=0 +cfg_script_name="cmake-build-cfg.py" while [ ${counter} -lt 5 ] do - cd .. - if [ -f "cmake_build_config.py" ];then - break - fi - counter=$((counter=counter + 1)) + if [ -f ${cfg_script_name} ];then + break + fi + counter=$((counter=counter + 1)) + cd .. done if [ "${counter}" -ge 5 ];then - echo "create_cmake_cfg.sh not found in upper directories!" - exit 1 + echo "${cfg_script_name} not found in upper directories!" + exit 1 fi build_generator="" @@ -28,6 +29,6 @@ fi echo "Running command (without the leading +):" set -x # Print command -"${python}" cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -l "${builddir}" +${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -l "${builddir}" # Use this if commands are added which should not be printed # set +x diff --git a/cmake/scripts/Hosted/make_releae_cfg.sh b/cmake/scripts/Hosted/make-release-cfg.sh similarity index 60% rename from cmake/scripts/Hosted/make_releae_cfg.sh rename to cmake/scripts/Hosted/make-release-cfg.sh index ab258c5..4618c8d 100755 --- a/cmake/scripts/Hosted/make_releae_cfg.sh +++ b/cmake/scripts/Hosted/make-release-cfg.sh @@ -1,17 +1,18 @@ #!/bin/sh counter=0 +cfg_script_name="cmake-build-cfg.py" while [ ${counter} -lt 5 ] do - cd .. - if [ -f "cmake_build_config.py" ];then - break - fi - counter=$((counter=counter + 1)) + if [ -f ${cfg_script_name} ];then + break + fi + counter=$((counter=counter + 1)) + cd .. done if [ "${counter}" -ge 5 ];then - echo "create_cmake_cfg.sh not found in upper directories!" - exit 1 + echo "${cfg_script_name} not found in upper directories!" + exit 1 fi build_generator="" @@ -28,6 +29,6 @@ fi echo "Running command (without the leading +):" set -x # Print command -"${python}" cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -l "${builddir}" +${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "release" -l "${builddir}" # Use this if commands are added which should not be printed # set +x diff --git a/cmake/scripts/Hosted/ninja_debug_cfg.sh b/cmake/scripts/Hosted/ninja-debug-cfg.sh similarity index 58% rename from cmake/scripts/Hosted/ninja_debug_cfg.sh rename to cmake/scripts/Hosted/ninja-debug-cfg.sh index 85a6ada..1fc42d7 100755 --- a/cmake/scripts/Hosted/ninja_debug_cfg.sh +++ b/cmake/scripts/Hosted/ninja-debug-cfg.sh @@ -1,17 +1,18 @@ #!/bin/sh counter=0 +cfg_script_name="cmake-build-cfg.py" while [ ${counter} -lt 5 ] do - cd .. - if [ -f "cmake_build_config.py" ];then - break - fi - counter=$((counter=counter + 1)) + if [ -f ${cfg_script_name} ];then + break + fi + counter=$((counter=counter + 1)) + cd .. done if [ "${counter}" -ge 5 ];then - echo "create_cmake_cfg.sh not found in upper directories!" - exit 1 + echo "${cfg_script_name} not found in upper directories!" + exit 1 fi build_generator="" @@ -27,6 +28,6 @@ fi echo "Running command (without the leading +):" set -x # Print command -"${python}" cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -l "${builddir}" +${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -l "${builddir}" # Use this if commands are added which should not be printed # set +x diff --git a/cmake/scripts/Hosted/ninja_release_cfg.sh b/cmake/scripts/Hosted/ninja-release-cfg.sh similarity index 58% rename from cmake/scripts/Hosted/ninja_release_cfg.sh rename to cmake/scripts/Hosted/ninja-release-cfg.sh index e870b30..b2998db 100755 --- a/cmake/scripts/Hosted/ninja_release_cfg.sh +++ b/cmake/scripts/Hosted/ninja-release-cfg.sh @@ -1,17 +1,18 @@ #!/bin/sh counter=0 +cfg_script_name="cmake-build-cfg.py" while [ ${counter} -lt 5 ] do - cd .. - if [ -f "cmake_build_config.py" ];then - break - fi - counter=$((counter=counter + 1)) + if [ -f ${cfg_script_name} ];then + break + fi + counter=$((counter=counter + 1)) + cd .. done if [ "${counter}" -ge 5 ];then - echo "create_cmake_cfg.sh not found in upper directories!" - exit 1 + echo "${cfg_script_name} not found in upper directories!" + exit 1 fi build_generator="" @@ -27,6 +28,6 @@ fi echo "Running command (without the leading +):" set -x # Print command -"${python}" cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -l "${builddir}" +${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "release" -l "${builddir}" # Use this if commands are added which should not be printed # set +x diff --git a/cmake/scripts/Linux/make-debug-cfg.sh b/cmake/scripts/Linux/make-debug-cfg.sh index b5de37c..9fd03ec 100755 --- a/cmake/scripts/Linux/make-debug-cfg.sh +++ b/cmake/scripts/Linux/make-debug-cfg.sh @@ -18,6 +18,12 @@ fi build_generator="Unix Makefiles" os_fsfw="linux" builddir="build-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 +):" set -x # Print command diff --git a/cmake/scripts/Linux/make-release-cfg.sh b/cmake/scripts/Linux/make-release-cfg.sh index e5baa23..95491e3 100755 --- a/cmake/scripts/Linux/make-release-cfg.sh +++ b/cmake/scripts/Linux/make-release-cfg.sh @@ -18,6 +18,12 @@ fi build_generator="Unix Makefiles" os_fsfw="linux" builddir="build-Release" +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 +):" set -x # Print command diff --git a/cmake/scripts/Linux/ninja-debug-cfg.sh b/cmake/scripts/Linux/ninja-debug-cfg.sh index e1ef45f..fe08aa1 100755 --- a/cmake/scripts/Linux/ninja-debug-cfg.sh +++ b/cmake/scripts/Linux/ninja-debug-cfg.sh @@ -18,6 +18,12 @@ fi build_generator="Ninja" os_fsfw="linux" builddir="build-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 +):" set -x # Print command